Avoid stack trace for empty icons
This commit is contained in:
parent
d09fdb2ff2
commit
fa27fe9036
2 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ class NotificationParser {
|
|||
)
|
||||
}
|
||||
} else null
|
||||
val icon: Icon? = if (message.icon != null) Icon(url = message.icon) else null
|
||||
val icon: Icon? = if (message.icon != null && message.icon != "") Icon(url = message.icon) else null
|
||||
val notification = Notification(
|
||||
id = message.id,
|
||||
subscriptionId = subscriptionId,
|
||||
|
|
|
@ -124,7 +124,7 @@ class FirebaseService : FirebaseMessagingService() {
|
|||
url = attachmentUrl,
|
||||
)
|
||||
} else null
|
||||
val icon: Icon? = iconUrl?.let { Icon(url = it) }
|
||||
val icon: Icon? = if (iconUrl != null && iconUrl != "") Icon(url = iconUrl) else null
|
||||
val notification = Notification(
|
||||
id = id,
|
||||
subscriptionId = subscription.id,
|
||||
|
|
Loading…
Reference in a new issue