mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-21 12:48:26 +00:00
set unread message count in notifications.
was not able to squash commit requesting new pull
This commit is contained in:
parent
d260cdcc9f
commit
a0c821f6ac
@ -160,6 +160,7 @@ public class MessageNotifier {
|
|||||||
builder.setContentTitle(recipient.toShortString());
|
builder.setContentTitle(recipient.toShortString());
|
||||||
builder.setContentText(notifications.get(0).getText());
|
builder.setContentText(notifications.get(0).getText());
|
||||||
builder.setContentIntent(notifications.get(0).getPendingIntent(context));
|
builder.setContentIntent(notifications.get(0).getPendingIntent(context));
|
||||||
|
builder.setContentInfo(String.valueOf(notificationState.getMessageCount()));
|
||||||
|
|
||||||
if (masterSecret != null) {
|
if (masterSecret != null) {
|
||||||
builder.addAction(R.drawable.check, context.getString(R.string.MessageNotifier_mark_as_read),
|
builder.addAction(R.drawable.check, context.getString(R.string.MessageNotifier_mark_as_read),
|
||||||
@ -201,6 +202,8 @@ public class MessageNotifier {
|
|||||||
builder.setContentText(String.format(context.getString(R.string.MessageNotifier_most_recent_from_s),
|
builder.setContentText(String.format(context.getString(R.string.MessageNotifier_most_recent_from_s),
|
||||||
notifications.get(0).getIndividualRecipientName()));
|
notifications.get(0).getIndividualRecipientName()));
|
||||||
builder.setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, RoutingActivity.class), 0));
|
builder.setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, RoutingActivity.class), 0));
|
||||||
|
|
||||||
|
builder.setContentInfo(String.valueOf(notificationState.getMessageCount()));
|
||||||
|
|
||||||
if (masterSecret != null) {
|
if (masterSecret != null) {
|
||||||
builder.addAction(R.drawable.check, context.getString(R.string.MessageNotifier_mark_all_as_read),
|
builder.addAction(R.drawable.check, context.getString(R.string.MessageNotifier_mark_all_as_read),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user