aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/services/NotificationService.java2
-rw-r--r--src/main/res/values/strings.xml1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java
index 73d536d1a..5e86ebb91 100644
--- a/src/main/java/de/pixart/messenger/services/NotificationService.java
+++ b/src/main/java/de/pixart/messenger/services/NotificationService.java
@@ -399,6 +399,7 @@ public class NotificationService {
modifyForTextOnly(mBuilder, mUnreadBuilder, messages);
}
RemoteInput remoteInput = new RemoteInput.Builder("text_reply").setLabel(UIHelper.getMessageHint(mXmppConnectionService, conversation)).build();
+ NotificationCompat.Action markReadAction = new NotificationCompat.Action.Builder(R.drawable.ic_send_text_offline, mXmppConnectionService.getResources().getString(R.string.mark_as_read), createReadPendingIntent(conversation)).build();
NotificationCompat.Action replyAction = new NotificationCompat.Action.Builder(R.drawable.ic_send_text_offline, mXmppConnectionService.getResources().getString(R.string.reply), createReplyIntent(conversation, false)).addRemoteInput(remoteInput).build();
NotificationCompat.Action wearReplyAction = new NotificationCompat.Action.Builder(R.drawable.ic_wear_reply, "Reply", createReplyIntent(conversation, true)).addRemoteInput(remoteInput).build();
mBuilder.extend(new NotificationCompat.WearableExtender().addAction(wearReplyAction));
@@ -406,6 +407,7 @@ public class NotificationService {
mUnreadBuilder.setReadPendingIntent(createReadPendingIntent(conversation));
mBuilder.extend(new NotificationCompat.CarExtender().setUnreadConversation(mUnreadBuilder.build()));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ mBuilder.addAction(markReadAction);
mBuilder.addAction(replyAction);
}
if ((message = getFirstDownloadableMessage(messages)) != null) {
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 047db6e0a..8121ea382 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -784,4 +784,5 @@
<string name="network_is_unreachable">Network is unreachable</string>
<string name="certificate_does_not_contain_jid">Certificate does not contain a Jabber ID</string>
<string name="error_no_keys_to_trust_presence">There are no usable keys available for this contact.\\nMake sure you have mutual presence subscription.</string>
+ <string name="mark_as_read">Mark as read</string>
</resources>