Add reply action for pre-M devices

This commit is contained in:
Moez Bhatti
2018-04-15 21:55:36 -04:00
parent 4e9d43e92e
commit ef1e5b22de
@@ -156,6 +156,11 @@ class NotificationManagerImpl @Inject constructor(
if (Build.VERSION.SDK_INT >= 24) {
notification.addAction(getReplyAction(conversation.recipients[0]?.address.orEmpty(), threadId))
} else {
val replyIntent = Intent(context, QkReplyActivity::class.java).putExtra("threadId", threadId)
val replyPI = PendingIntent.getActivity(context, threadId.toInt() + 40000, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT)
val replyAction = NotificationCompat.Action(R.drawable.ic_reply_white_24dp, context.getString(R.string.notification_reply), replyPI)
notification.addAction(replyAction)
}
if (prefs.qkreply.get()) {