From 6e8e7164c6f0c5cc365d97d09879b19074eed9fe Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 7 May 2020 15:29:42 +0000 Subject: [PATCH] Use last event when generating ticker text. --- .../riotx/features/notifications/NotificationDrawerManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt index 66a80be89e..9e3a298378 100644 --- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt +++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt @@ -344,9 +344,9 @@ class NotificationDrawerManager @Inject constructor(private val context: Context } val tickerText = if (roomEventGroupInfo.isDirect) { - stringProvider.getString(R.string.notification_ticker_text_dm, events[0].senderName, events[0].description) + stringProvider.getString(R.string.notification_ticker_text_dm, events.last().senderName, events.last().description) } else { - stringProvider.getString(R.string.notification_ticker_text_group, roomName, events[0].senderName, events[0].description) + stringProvider.getString(R.string.notification_ticker_text_group, roomName, events.last().senderName, events.last().description) } val notification = notificationUtils.buildMessagesListNotification(