From 7fe544f697b3755b160c3fcaaa52ca84c1f7cd3f Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Wed, 15 Jul 2026 17:08:14 +0300 Subject: [PATCH] Simplified showMissedCallNotification function --- .../kotlin/com/tutpro/baresip/BaresipService.kt | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt index 15187b0d..1890ae6b 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -3120,6 +3120,8 @@ class BaresipService: Service() { .setDeleteIntent(dpi) .setCategory(NotificationCompat.CATEGORY_MISSED_CALL) .setAutoCancel(true) + .setContentTitle(getString(R.string.missed_call_from)) + .setContentText(caller) var missedCalls = 0 for (notification in nm.activeNotifications) @@ -3128,20 +3130,7 @@ class BaresipService: Service() { break } - if (missedCalls == 0) { - nb.setContentTitle(getString(R.string.missed_call_from)) - nb.setContentText(caller) - nb.setNumber(1) - } else { - nb.setContentTitle(getString(R.string.missed_calls)) - nb.setContentText( - String.format( - getString(R.string.missed_calls_count), - missedCalls + 1 - ) - ) - nb.setNumber(missedCalls + 1) - } + nb.setNumber(missedCalls + 1) nm.notify(CALL_MISSED_NOTIFICATION_ID, nb.build()) }