mirror of
https://github.com/krille-chan/fluffychat
synced 2024-08-11 07:13:44 +00:00
chore: Follow up migration notification
This commit is contained in:
parent
ea790f43ac
commit
dea0bfd723
1 changed files with 4 additions and 6 deletions
|
@ -1,8 +1,4 @@
|
|||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
|
@ -134,13 +130,14 @@ abstract class ClientManager {
|
|||
static void sendMigrationNotification(
|
||||
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin,
|
||||
) async {
|
||||
final l10n = lookupL10n(Locale(Platform.localeName));
|
||||
final l10n = lookupL10n(PlatformDispatcher.instance.locale);
|
||||
|
||||
if (kIsWeb) {
|
||||
html.Notification(
|
||||
l10n.databaseMigrationTitle,
|
||||
body: l10n.databaseMigrationBody,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await flutterLocalNotificationsPlugin.initialize(
|
||||
|
@ -164,7 +161,8 @@ abstract class ClientManager {
|
|||
fullScreenIntent: true, // To show notification popup
|
||||
showProgress: true,
|
||||
),
|
||||
iOS: DarwinNotificationDetails(),
|
||||
iOS: DarwinNotificationDetails(sound: 'notification.caf'),
|
||||
linux: LinuxNotificationDetails(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue