From 6b4b0ebd0b65f0d1d2965ef6acd1301399dcf475 Mon Sep 17 00:00:00 2001 From: Erisu Date: Sat, 31 Aug 2024 14:58:32 +0900 Subject: [PATCH] fix(android): clipped notification text and expand arrow --- src/android/com/adobe/phonegap/push/FCMService.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/android/com/adobe/phonegap/push/FCMService.kt b/src/android/com/adobe/phonegap/push/FCMService.kt index 7c1d6a0b1..2f0677488 100644 --- a/src/android/com/adobe/phonegap/push/FCMService.kt +++ b/src/android/com/adobe/phonegap/push/FCMService.kt @@ -906,17 +906,16 @@ class FCMService : FirebaseMessagingService() { setNotification(notId, "") message?.let { messageStr -> - val bigText = NotificationCompat.BigTextStyle().run { - bigText(fromHtml(messageStr)) - setBigContentTitle(fromHtml(it.getString(PushConstants.TITLE))) + val bigText = NotificationCompat.BigTextStyle() + .bigText(fromHtml(messageStr)) + .setBigContentTitle(fromHtml(it.getString(PushConstants.TITLE))) - it.getString(PushConstants.SUMMARY_TEXT)?.let { summaryText -> - setSummaryText(fromHtml(summaryText)) - } + it.getString(PushConstants.SUMMARY_TEXT)?.let { summaryText -> + bigText.setSummaryText(fromHtml(summaryText)) } mBuilder.setContentText(fromHtml(messageStr)) - mBuilder.setStyle(NotificationCompat.BigTextStyle().bigText(messageStr)) + mBuilder.setStyle(bigText) } } }