mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
No need for an id, can use ordinal.
This commit is contained in:
+4
-4
@@ -33,7 +33,7 @@ object NotificationIdProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getForegroundServiceNotificationId(type: ForegroundServiceType): Int {
|
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 {
|
private fun getOffset(sessionId: SessionId): Int {
|
||||||
@@ -50,7 +50,7 @@ object NotificationIdProvider {
|
|||||||
private const val FOREGROUND_SERVICE_NOTIFICATION_ID = 4
|
private const val FOREGROUND_SERVICE_NOTIFICATION_ID = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class ForegroundServiceType(val id: Int) {
|
enum class ForegroundServiceType {
|
||||||
INCOMING_CALL(1),
|
INCOMING_CALL,
|
||||||
ONGOING_CALL(2),
|
ONGOING_CALL,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user