Use bigText for in-app notif from channel

This commit is contained in:
S1m 2024-01-16 20:01:01 +01:00
parent db43b1ffea
commit bb49730c91
2 changed files with 6 additions and 5 deletions

View File

@ -18,6 +18,6 @@ object LocalNotification {
fun showNotification(context: Context, connectorToken: String, content: String) { fun showNotification(context: Context, connectorToken: String, content: String) {
val title = getDb(context).getNotificationTitle(connectorToken) ?: context.getString(R.string.app_name) val title = getDb(context).getNotificationTitle(connectorToken) ?: context.getString(R.string.app_name)
FromPushNotification(context, title, content).show() FromPushNotification(context, title, content).showBig()
} }
} }

View File

@ -124,16 +124,17 @@ open class AppNotification(
} }
} }
fun create(): Notification { fun create(bigText: Boolean = false): Notification {
createNotificationChannel() createNotificationChannel()
return createNotification( return createNotification(
createIntentToMain() createIntentToMain(),
bigText
) )
} }
fun show() { fun showBig() {
show(notificationId, create()) show(notificationId, create(true))
} }
fun showSingle() { fun showSingle() {