Commit 6fb08385 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Dismiss notification on tap if host is empty

parent 0815edac
...@@ -250,11 +250,14 @@ class PushManager @Inject constructor( ...@@ -250,11 +250,14 @@ class PushManager @Inject constructor(
.setContentIntent(contentIntent) .setContentIntent(contentIntent)
.setMessageNotification() .setMessageNotification()
if (host.isEmpty()) {
builder.setContentIntent(deleteIntent)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channelId: String val channelId: String
val channelName: String val channelName: String
if (host.isEmpty()) { if (host.isEmpty()) {
builder.setContentIntent(deleteIntent)
channelName = "Test Notification" channelName = "Test Notification"
channelId = "test-channel" channelId = "test-channel"
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment