From 795bc82c7f653685e40088bddfd09d0658ab955a Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Sun, 7 May 2023 18:59:29 +0530 Subject: [PATCH] Show number of new streams in the collapsed summary notification. --- .../local/feed/notifications/NotificationHelper.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/notifications/NotificationHelper.kt b/app/src/main/java/org/schabi/newpipe/local/feed/notifications/NotificationHelper.kt index c66b0d1c0..228f58a2f 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/notifications/NotificationHelper.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/notifications/NotificationHelper.kt @@ -21,7 +21,6 @@ import com.squareup.picasso.Target import org.schabi.newpipe.R import org.schabi.newpipe.extractor.stream.StreamInfoItem import org.schabi.newpipe.local.feed.service.FeedUpdateInfo -import org.schabi.newpipe.util.Localization import org.schabi.newpipe.util.NavigationHelper import org.schabi.newpipe.util.PicassoHelper @@ -48,12 +47,8 @@ class NotificationHelper(val context: Context) { context, context.getString(R.string.streams_notification_channel_id) ) - .setContentTitle(Localization.concatenateStrings(data.name, summary)) - .setContentText( - data.listInfo.relatedItems.joinToString( - context.getString(R.string.enumeration_comma) - ) { it.name } - ) + .setContentTitle(data.name) + .setContentText(summary) .setNumber(newStreams.size) .setBadgeIconType(NotificationCompat.BADGE_ICON_LARGE) .setPriority(NotificationCompat.PRIORITY_DEFAULT) @@ -68,7 +63,6 @@ class NotificationHelper(val context: Context) { // Build a summary notification for Android versions < 7.0 val style = NotificationCompat.InboxStyle() - .setSummaryText(summary) .setBigContentTitle(data.name) newStreams.forEach { style.addLine(it.name) } summaryBuilder.setStyle(style)