Do not replace in-app notif from channel
This commit is contained in:
parent
8895a8e482
commit
db43b1ffea
|
@ -15,13 +15,13 @@ import org.unifiedpush.distributor.nextpush.R
|
|||
import org.unifiedpush.distributor.nextpush.activities.MainActivity
|
||||
import org.unifiedpush.distributor.nextpush.services.RegistrationCountCache
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
const val NOTIFICATION_ID_FOREGROUND = 51115
|
||||
const val NOTIFICATION_ID_WARNING = 51215
|
||||
const val NOTIFICATION_ID_NO_START = 51315
|
||||
const val NOTIFICATION_ID_LOW_KEEPALIVE = 51315
|
||||
const val NOTIFICATION_ID_NO_PING = 51515
|
||||
const val NOTIFICATION_ID_FROM_PUSH = 51615
|
||||
|
||||
data class ChannelData(
|
||||
val id: String,
|
||||
|
@ -244,7 +244,7 @@ class ForegroundNotification(context: Context) : AppNotification(
|
|||
|
||||
class FromPushNotification(context: Context, title: String, content: String) : AppNotification(
|
||||
context,
|
||||
NOTIFICATION_ID_FROM_PUSH,
|
||||
Notifications.nextNotificationId.getAndIncrement(),
|
||||
NotificationData(
|
||||
title,
|
||||
content,
|
||||
|
@ -253,9 +253,13 @@ class FromPushNotification(context: Context, title: String, content: String) : A
|
|||
false
|
||||
),
|
||||
ChannelData(
|
||||
"${context.getString(R.string.app_name)}.PushNotification",
|
||||
"Push notifications",
|
||||
"${context.getString(R.string.app_name)}.Push.$title",
|
||||
"(Push) $title",
|
||||
NotificationManager.IMPORTANCE_HIGH,
|
||||
context.getString(R.string.local_notif_description)
|
||||
)
|
||||
)
|
||||
|
||||
private object Notifications {
|
||||
val nextNotificationId = AtomicInteger(50000)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue