Use string resource for generating ticker text.

This commit is contained in:
Nolan Darilek 2020-05-07 15:14:31 +00:00
parent 2e4d30ef29
commit 6bbded1e65
2 changed files with 4 additions and 2 deletions

View file

@ -344,9 +344,9 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
}
val tickerText = if (roomEventGroupInfo.isDirect) {
String.format("%s: %s", events[0].senderName, events[0].description)
stringProvider.getString(R.string.notification_ticker_text_dm, events[0].senderName, events[0].description)
} else {
String.format("%s: %s %s", roomName, events[0].senderName, events[0].description)
stringProvider.getString(R.string.notification_ticker_text_group, roomName, events[0].senderName, events[0].description)
}
val notification = notificationUtils.buildMessagesListNotification(

View file

@ -1089,6 +1089,8 @@
<string name="notification_new_invitation">New Invitation</string>
<string name="notification_sender_me">Me</string>
<string name="notification_inline_reply_failed">** Failed to send - please open room</string>
<string name="notification_ticker_text_dm">%1$s: %2$s</string>
<string name="notification_ticker_text_group">%1$s: %2$s %3$s</string>
<!-- historical -->
<string name="historical_placeholder">Search for historical</string>