From 265b611c8a60783c62961162fa9b2a4bbe229b04 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 14 Nov 2025 09:38:31 +0100 Subject: [PATCH] No need for an id, can use ordinal. --- .../push/api/notifications/NotificationIdProvider.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/push/api/src/main/kotlin/io/element/android/libraries/push/api/notifications/NotificationIdProvider.kt b/libraries/push/api/src/main/kotlin/io/element/android/libraries/push/api/notifications/NotificationIdProvider.kt index ab0dfb0425..ff7119b647 100644 --- a/libraries/push/api/src/main/kotlin/io/element/android/libraries/push/api/notifications/NotificationIdProvider.kt +++ b/libraries/push/api/src/main/kotlin/io/element/android/libraries/push/api/notifications/NotificationIdProvider.kt @@ -33,7 +33,7 @@ object NotificationIdProvider { } fun getForegroundServiceNotificationId(type: ForegroundServiceType): Int { - return type.id * 10 + FOREGROUND_SERVICE_NOTIFICATION_ID + return type.ordinal * 10 + FOREGROUND_SERVICE_NOTIFICATION_ID } private fun getOffset(sessionId: SessionId): Int { @@ -50,7 +50,7 @@ object NotificationIdProvider { private const val FOREGROUND_SERVICE_NOTIFICATION_ID = 4 } -enum class ForegroundServiceType(val id: Int) { - INCOMING_CALL(1), - ONGOING_CALL(2), +enum class ForegroundServiceType { + INCOMING_CALL, + ONGOING_CALL, }