mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
lets make those pendingintents mutable
This commit is contained in:
@@ -746,7 +746,7 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
|
|||||||
putExtra(THREAD_ID, threadId)
|
putExtra(THREAD_ID, threadId)
|
||||||
}
|
}
|
||||||
|
|
||||||
val pendingIntent = PendingIntent.getActivity(this, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
val pendingIntent = PendingIntent.getActivity(this, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
|
||||||
val summaryText = getString(R.string.new_message)
|
val summaryText = getString(R.string.new_message)
|
||||||
val markAsReadIntent = Intent(this, MarkAsReadReceiver::class.java).apply {
|
val markAsReadIntent = Intent(this, MarkAsReadReceiver::class.java).apply {
|
||||||
action = MARK_AS_READ
|
action = MARK_AS_READ
|
||||||
@@ -754,7 +754,7 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
|
|||||||
}
|
}
|
||||||
|
|
||||||
val markAsReadPendingIntent =
|
val markAsReadPendingIntent =
|
||||||
PendingIntent.getBroadcast(this, threadId.hashCode(), markAsReadIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
PendingIntent.getBroadcast(this, threadId.hashCode(), markAsReadIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
|
||||||
var replyAction: NotificationCompat.Action? = null
|
var replyAction: NotificationCompat.Action? = null
|
||||||
|
|
||||||
if (isNougatPlus()) {
|
if (isNougatPlus()) {
|
||||||
@@ -769,7 +769,7 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
|
|||||||
}
|
}
|
||||||
|
|
||||||
val replyPendingIntent =
|
val replyPendingIntent =
|
||||||
PendingIntent.getBroadcast(applicationContext, threadId.hashCode(), replyIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
PendingIntent.getBroadcast(applicationContext, threadId.hashCode(), replyIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
|
||||||
replyAction = NotificationCompat.Action.Builder(R.drawable.ic_send_vector, replyLabel, replyPendingIntent)
|
replyAction = NotificationCompat.Action.Builder(R.drawable.ic_send_vector, replyLabel, replyPendingIntent)
|
||||||
.addRemoteInput(remoteInput)
|
.addRemoteInput(remoteInput)
|
||||||
.build()
|
.build()
|
||||||
|
@@ -87,7 +87,7 @@ class SmsStatusSentReceiver : SentReceiver() {
|
|||||||
putExtra(THREAD_ID, threadId)
|
putExtra(THREAD_ID, threadId)
|
||||||
}
|
}
|
||||||
|
|
||||||
val pendingIntent = PendingIntent.getActivity(context, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
val pendingIntent = PendingIntent.getActivity(context, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
|
||||||
val summaryText = String.format(context.getString(R.string.message_sending_error), recipientName)
|
val summaryText = String.format(context.getString(R.string.message_sending_error), recipientName)
|
||||||
|
|
||||||
val largeIcon = SimpleContactsHelper(context).getContactLetterIcon(recipientName)
|
val largeIcon = SimpleContactsHelper(context).getContactLetterIcon(recipientName)
|
||||||
|
Reference in New Issue
Block a user