Show folder name in new message notifications

pull/146/head
M66B 6 years ago
parent cd0dec4de1
commit 70b5c51db9

@ -574,11 +574,15 @@ public class ServiceSynchronize extends LifecycleService {
else else
mbuilder = new Notification.Builder(this, "notification"); mbuilder = new Notification.Builder(this, "notification");
String folderName = message.folderDisplay == null
? Helper.localizeFolderName(this, message.folderName)
: message.folderDisplay;
mbuilder mbuilder
.addExtras(args) .addExtras(args)
.setSmallIcon(R.drawable.baseline_mail_24) .setSmallIcon(R.drawable.baseline_mail_24)
.setContentTitle(MessageHelper.getFormattedAddresses(message.from, true)) .setContentTitle(MessageHelper.getFormattedAddresses(message.from, true))
.setSubText(message.accountName) .setSubText(message.accountName + " · " + folderName)
.setContentIntent(piContent) .setContentIntent(piContent)
.setWhen(message.received) .setWhen(message.received)
.setDeleteIntent(piDelete) .setDeleteIntent(piDelete)

Loading…
Cancel
Save