From 5a2f72ff3abf256c3d2e74177e4ea6a9c69064ec Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Sat, 26 Apr 2025 09:31:50 +0300 Subject: [PATCH] More call history cleanup --- app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt | 1 - app/src/main/kotlin/com/tutpro/baresip/CallsActivity.kt | 3 +-- app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt index 244c61b5..78f2a2f3 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -454,7 +454,6 @@ class BaresipService: Service() { new.recording = old.recording new.add() } - CallHistoryNew.save() } Message.restore() diff --git a/app/src/main/kotlin/com/tutpro/baresip/CallsActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/CallsActivity.kt index a9bdb2e7..6dd2b18a 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/CallsActivity.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/CallsActivity.kt @@ -203,7 +203,6 @@ class CallsActivity : ComponentActivity() { delete -> { positiveAction.value = { CallHistoryNew.clear(aor) - CallHistoryNew.save() uaHistory.value = emptyList() } showDialog.value = true @@ -345,7 +344,6 @@ class CallsActivity : ComponentActivity() { positiveButtonText.value = getString(R.string.delete) positiveAction.value = { removeFromHistory(callRow) - CallHistoryNew.save() } neutralButtonText.value = "" } @@ -525,6 +523,7 @@ class CallsActivity : ComponentActivity() { } CallHistoryNew.deleteRecording(callRow.recording) deleteFromUaHistory(callRow) + CallHistoryNew.save() } private fun addToUaHistory(callRow: CallRow) { diff --git a/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt index 862e75e3..6b11886e 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt @@ -2726,11 +2726,6 @@ class MainActivity : ComponentActivity() { Utils.deleteFile(it) } - CallHistoryNew.restore() - for (h in BaresipService.callHistory) - h.recording = arrayOf("", "") - CallHistoryNew.save() - dialogTitle.value = getString(R.string.info) dialogMessage.value = getString(R.string.restored) positiveText.value = getString(R.string.restart)