chore: Follow up notification actions
This commit is contained in:
parent
ae11d5b47f
commit
b7e112a224
3 changed files with 20 additions and 2 deletions
|
|
@ -34,6 +34,7 @@ import 'package:unifiedpush/unifiedpush.dart';
|
|||
import 'package:unifiedpush_ui/unifiedpush_ui.dart';
|
||||
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/main.dart';
|
||||
import 'package:fluffychat/utils/notification_background_handler.dart';
|
||||
import 'package:fluffychat/utils/push_helper.dart';
|
||||
import 'package:fluffychat/widgets/fluffy_chat_app.dart';
|
||||
|
|
@ -77,6 +78,20 @@ class BackgroundPush {
|
|||
void _init() async {
|
||||
//<GOOGLE_SERVICES>firebaseEnabled = true;
|
||||
try {
|
||||
mainIsolateReceivePort?.listen(
|
||||
(message) async {
|
||||
try {
|
||||
await notificationTap(
|
||||
NotificationResponseJson.fromJsonString(message),
|
||||
client: client,
|
||||
router: FluffyChatApp.router,
|
||||
l10n: l10n,
|
||||
);
|
||||
} catch (e, s) {
|
||||
Logs().wtf('Main Notification Tap crashed', e, s);
|
||||
}
|
||||
},
|
||||
);
|
||||
if (PlatformInfos.isAndroid) {
|
||||
final port = ReceivePort();
|
||||
IsolateNameServer.removePortNameMapping('background_tab_port');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue