change icon in message from object to string
This commit is contained in:
parent
ecefdd3df6
commit
12bd524cbd
2 changed files with 8 additions and 15 deletions
|
@ -13,7 +13,7 @@ data class Message(
|
||||||
val priority: Int?,
|
val priority: Int?,
|
||||||
val tags: List<String>?,
|
val tags: List<String>?,
|
||||||
val click: String?,
|
val click: String?,
|
||||||
val icon: MessageIcon?,
|
val icon: String?,
|
||||||
val actions: List<MessageAction>?,
|
val actions: List<MessageAction>?,
|
||||||
val title: String?,
|
val title: String?,
|
||||||
val message: String,
|
val message: String,
|
||||||
|
@ -44,11 +44,4 @@ data class MessageAction(
|
||||||
val extras: Map<String,String>?, // used in "broadcast" action
|
val extras: Map<String,String>?, // used in "broadcast" action
|
||||||
)
|
)
|
||||||
|
|
||||||
@Keep
|
|
||||||
data class MessageIcon(
|
|
||||||
val url: String,
|
|
||||||
val type: String?,
|
|
||||||
val size: Long?,
|
|
||||||
)
|
|
||||||
|
|
||||||
const val MESSAGE_ENCODING_BASE64 = "base64"
|
const val MESSAGE_ENCODING_BASE64 = "base64"
|
||||||
|
|
|
@ -32,13 +32,6 @@ class NotificationParser {
|
||||||
url = message.attachment.url,
|
url = message.attachment.url,
|
||||||
)
|
)
|
||||||
} else null
|
} else null
|
||||||
val icon = if (message.icon?.url != null) {
|
|
||||||
Icon(
|
|
||||||
url = message.icon.url,
|
|
||||||
type = message.icon.type,
|
|
||||||
size = message.icon.size,
|
|
||||||
)
|
|
||||||
} else null
|
|
||||||
val actions = if (message.actions != null) {
|
val actions = if (message.actions != null) {
|
||||||
message.actions.map { a ->
|
message.actions.map { a ->
|
||||||
Action(
|
Action(
|
||||||
|
@ -57,6 +50,13 @@ class NotificationParser {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else null
|
} else null
|
||||||
|
val icon: Icon? = if (message.icon != null) {
|
||||||
|
Icon(
|
||||||
|
url = message.icon,
|
||||||
|
size = null,
|
||||||
|
type = null
|
||||||
|
)
|
||||||
|
} else null
|
||||||
val notification = Notification(
|
val notification = Notification(
|
||||||
id = message.id,
|
id = message.id,
|
||||||
subscriptionId = subscriptionId,
|
subscriptionId = subscriptionId,
|
||||||
|
|
Loading…
Reference in a new issue