Skip to content
Snippets Groups Projects
Verified Commit 3e880b85 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Correctly handle translations and notification intents

parent 41d696d0
Branches
Tags
No related merge requests found
Pipeline #
......@@ -88,14 +88,14 @@ class QuasseldroidNotificationManager @Inject constructor(private val context: C
val pendingIntentOpen = PendingIntent.getActivity(
context.applicationContext,
System.currentTimeMillis().toInt(),
ChatActivity.intent(context.applicationContext).apply {
ChatActivity.intent(context.applicationContext, bufferId = bufferInfo.bufferId).apply {
flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
},
0
)
val remoteInput = RemoteInput.Builder("reply_content")
.setLabel("Reply")
.setLabel(context.getString(R.string.label_reply))
.build()
val replyPendingIntent = PendingIntent.getService(
......@@ -152,9 +152,11 @@ class QuasseldroidNotificationManager @Inject constructor(private val context: C
}
}
)
.addAction(0, "Mark Read", markReadPendingIntent)
.addAction(0, context.getString(R.string.label_mark_read), markReadPendingIntent)
.addAction(
NotificationCompat.Action.Builder(0, "Reply", replyPendingIntent)
NotificationCompat.Action.Builder(0,
context.getString(R.string.label_reply),
replyPendingIntent)
.addRemoteInput(remoteInput)
.build()
)
......
......@@ -62,6 +62,7 @@
<string name="label_join_long">Kanal Betreten</string>
<string name="label_libraries">Bibliotheken</string>
<string name="label_license">Lizenz</string>
<string name="label_mark_read">Gelesen</string>
<string name="label_mention">Erwähnen</string>
<string name="label_mention_long">Kopiert den Nutzernamen in die Eingabezeile</string>
<string name="label_new_account">Account hinzufügen</string>
......@@ -74,6 +75,7 @@
<string name="label_new_server">Server hinzufügen</string>
<string name="label_nicklist">Benutzerliste</string>
<string name="label_no">Nein</string>
<string name="label_reply">Antworten</string>
<string name="label_reset">Zurücksetzen</string>
<string name="label_open">Öffnen</string>
<string name="label_part">Verlassen</string>
......
......@@ -62,6 +62,7 @@
<string name="label_join_long">Join Channel</string>
<string name="label_libraries">Libraries</string>
<string name="label_license">License</string>
<string name="label_mark_read">Mark Read</string>
<string name="label_mention">Mention</string>
<string name="label_mention_long">Copy username into input line</string>
<string name="label_new_account">New Account</string>
......@@ -74,6 +75,7 @@
<string name="label_new_server">New Server</string>
<string name="label_nicklist">Nick List</string>
<string name="label_no">No</string>
<string name="label_reply">Reply</string>
<string name="label_reset">Reset</string>
<string name="label_open">Open</string>
<string name="label_part">Leave</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment