mirror of
https://github.com/krille-chan/fluffychat
synced 2024-08-10 07:53:44 +00:00
chore: Follow up database migration notification on linux
This commit is contained in:
parent
5d639663fe
commit
84fd65f55e
1 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:desktop_notifications/desktop_notifications.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
@ -137,6 +140,17 @@ abstract class ClientManager {
|
|||
);
|
||||
return;
|
||||
}
|
||||
if (Platform.isLinux) {
|
||||
await NotificationsClient().notify(
|
||||
l10n.databaseMigrationTitle,
|
||||
body: l10n.databaseMigrationBody,
|
||||
appName: AppConfig.applicationName,
|
||||
hints: [
|
||||
NotificationHint.soundName('message-new-instant'),
|
||||
],
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await flutterLocalNotificationsPlugin.initialize(
|
||||
const InitializationSettings(
|
||||
|
@ -160,7 +174,6 @@ abstract class ClientManager {
|
|||
showProgress: true,
|
||||
),
|
||||
iOS: DarwinNotificationDetails(sound: 'notification.caf'),
|
||||
linux: LinuxNotificationDetails(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue