Commit b3483561 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Show full content (almost) of a message if just one message is received on Nougat

parent 30ab9216
......@@ -361,8 +361,6 @@ object PushManager {
val pushMessageList = hostToPushMessageList.get(host)
pushMessageList?.let {
val inbox = Notification.InboxStyle()
val userMessages = pushMessageList.filter {
it.notificationId == lastPushMessage.notificationId
}
......@@ -372,16 +370,25 @@ object PushManager {
}.size
builder.setContentTitle(getTitle(count, title))
inbox.setBigContentTitle(getTitle(count, title))
if (count > 1) {
val inbox = Notification.InboxStyle()
inbox.setBigContentTitle(getTitle(count, title))
for (push in userMessages) {
inbox.addLine(push.message)
}
builder.setStyle(inbox)
} else {
val bigTextStyle = Notification.BigTextStyle()
.bigText(message.fromHtml())
builder.setStyle(bigTextStyle)
}
}
} else {
builder.setContentText(message.fromHtml())
val bigTextStyle = Notification.BigTextStyle()
.bigText(message.fromHtml())
builder.setStyle(bigTextStyle)
}
return builder.build()
......
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