From 3595bc445d2cdbe505b8e7b206c115a6c911e86f Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 20 May 2020 18:52:11 +0200 Subject: [PATCH] tweak notification-accessibility --- .../securesms/notifications/NotificationCenter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java index deb595359..375ed5d54 100644 --- a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -337,6 +337,14 @@ public class NotificationCenter { builder.setContentTitle(dcChat.getName()); } + // if privacy allows, for better accessibility, + // prepend the sender in the ticker also for one-to-one chats (for group-chats, this is already done) + String tickerLine = line; + if (!dcChat.isGroup() && privacy.isDisplayContact()) { + line = dcContext.getContact(dcMsg.getFromId()).getFirstName() + ": " + line; + } + builder.setTicker(tickerLine); + // set sound, vibrate, led for systems that do not have notification channels if (!notificationChannelsSupported()) { if (signal) {