mirror of
https://github.com/home-assistant/android
synced 2024-10-15 12:32:54 +00:00
Allow clickAction to be set to noAction to do nothing (#3407)
This commit is contained in:
parent
194ed7ef2f
commit
b38974b30f
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue