mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-06 03:59:28 +01:00
Default hardcoded message when l10n is not available
This commit is contained in:
parent
2b701cf56c
commit
fc1b49cf69
@ -45,8 +45,8 @@ Future<void> pushHelper(
|
|||||||
);
|
);
|
||||||
flutterLocalNotificationsPlugin.show(
|
flutterLocalNotificationsPlugin.show(
|
||||||
0,
|
0,
|
||||||
l10n?.newMessageInFluffyChat,
|
l10n?.newMessageInFluffyChat ?? 'New message in FluffyChat', // default to hardcoded value if l10n is null
|
||||||
l10n?.openAppToReadMessages,
|
l10n?.openAppToReadMessages ?? 'Open app to read messages', // default to hardcoded value if l10n is null
|
||||||
NotificationDetails(
|
NotificationDetails(
|
||||||
iOS: const DarwinNotificationDetails(),
|
iOS: const DarwinNotificationDetails(),
|
||||||
android: AndroidNotificationDetails(
|
android: AndroidNotificationDetails(
|
||||||
@ -54,7 +54,7 @@ Future<void> pushHelper(
|
|||||||
AppConfig.pushNotificationsChannelName,
|
AppConfig.pushNotificationsChannelName,
|
||||||
channelDescription: AppConfig.pushNotificationsChannelDescription,
|
channelDescription: AppConfig.pushNotificationsChannelDescription,
|
||||||
number: notification.counts?.unread,
|
number: notification.counts?.unread,
|
||||||
ticker: l10n!.unreadChats(notification.counts?.unread ?? 1),
|
ticker: l10n?.unreadChats(notification.counts?.unread ?? 1) ?? '1 unread chat', // default to hardcoded value if l10n is null
|
||||||
importance: Importance.max,
|
importance: Importance.max,
|
||||||
priority: Priority.high,
|
priority: Priority.high,
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user