- Allow deletion of account's chat history via chats activity menu item.

- Ask confirmation before deleting chat and call history.
- Improved updating of main activity voicemail, chat, and call icons.
- Removed path parameter from saveUaMessage, deleteUaMessage, and
  saveMessages functions.
This commit is contained in:
Juha Heinanen
2019-10-03 20:50:23 +03:00
parent 04cf77a60f
commit 39a0230bd0
10 changed files with 95 additions and 69 deletions
@@ -31,8 +31,8 @@ class Message(val aor: String, val peerUri: String, val message: String, val tim
BaresipService.messages.removeAt(firstIndex)
}
fun saveMessages(path: String) {
val file = File(path, "messages")
fun saveMessages() {
val file = File(BaresipService.filesPath, "messages")
try {
val fos = FileOutputStream(file)
val oos = ObjectOutputStream(fos)
@@ -46,8 +46,8 @@ class Message(val aor: String, val peerUri: String, val message: String, val tim
}
}
fun restoreMessages(path: String) {
val file = File(path, "messages")
fun restoreMessages() {
val file = File(BaresipService.filesPath, "messages")
if (file.exists()) {
try {
val fis = FileInputStream(file)
@@ -62,6 +62,5 @@ class Message(val aor: String, val peerUri: String, val message: String, val tim
}
}
}
}