mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Merge pull request #2397 from Bnyro/master
Fix issues with notification groups being empty
This commit is contained in:
commit
b0a0fb5ea3
@ -128,7 +128,6 @@ class NotificationWorker(appContext: Context, parameters: WorkerParameters) :
|
|||||||
)
|
)
|
||||||
|
|
||||||
streams.forEach { streamItem ->
|
streams.forEach { streamItem ->
|
||||||
notificationId += 1
|
|
||||||
createNotification(
|
createNotification(
|
||||||
title = streamItem.title.toString(),
|
title = streamItem.title.toString(),
|
||||||
description = streamItem.uploaderName.toString(),
|
description = streamItem.uploaderName.toString(),
|
||||||
@ -152,13 +151,15 @@ class NotificationWorker(appContext: Context, parameters: WorkerParameters) :
|
|||||||
description: String? = null,
|
description: String? = null,
|
||||||
isSummary: Boolean = false
|
isSummary: Boolean = false
|
||||||
) {
|
) {
|
||||||
val intent = Intent(applicationContext, MainActivity::class.java).apply {
|
// increase the notification ID to guarantee uniqueness
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
notificationId += 1
|
||||||
}
|
|
||||||
val pendingIntent: PendingIntent = PendingIntent.getActivity(
|
val pendingIntent: PendingIntent = PendingIntent.getActivity(
|
||||||
applicationContext,
|
applicationContext,
|
||||||
0,
|
0,
|
||||||
intent,
|
Intent(applicationContext, MainActivity::class.java).apply {
|
||||||
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||||
|
},
|
||||||
PendingIntent.FLAG_IMMUTABLE
|
PendingIntent.FLAG_IMMUTABLE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user