Allow clickAction to be set to noAction to do nothing (#3407)

This commit is contained in:
Daniel Shokouhi 2023-03-08 13:32:22 -08:00 committed by GitHub
parent 194ed7ef2f
commit b38974b30f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,6 +112,7 @@ class MessagingManager @Inject constructor(
const val MARKET_PREFIX = "https://play.google.com/store/apps/details?id="
const val SETTINGS_PREFIX = "settings://"
const val NOTIFICATION_HISTORY = "notification_history"
const val NO_ACTION = "noAction"
const val SUBJECT = "subject"
const val TIMEOUT = "timeout"
@ -979,7 +980,9 @@ class MessagingManager @Inject constructor(
data: Map<String, String>
) {
val actionUri = data["clickAction"] ?: "/"
builder.setContentIntent(createOpenUriPendingIntent(actionUri, data))
if (actionUri != NO_ACTION) {
builder.setContentIntent(createOpenUriPendingIntent(actionUri, data))
}
}
private fun handleDeleteIntent(