diff --git a/lib/screens/chat/room.dart b/lib/screens/chat/room.dart index e076e1a..64ac6b4 100644 --- a/lib/screens/chat/room.dart +++ b/lib/screens/chat/room.dart @@ -13,6 +13,7 @@ import 'package:surface/controllers/chat_message_controller.dart'; import 'package:surface/controllers/post_write_controller.dart'; import 'package:surface/providers/channel.dart'; import 'package:surface/providers/chat_call.dart'; +import 'package:surface/providers/notification.dart'; import 'package:surface/providers/sn_network.dart'; import 'package:surface/providers/user_directory.dart'; import 'package:surface/providers/userinfo.dart'; @@ -84,6 +85,10 @@ class _ChatRoomScreenState extends State { orElse: () => null, ); } + + if (!mounted) return; + final nty = context.read(); + nty.skippableNotifyChannel = _channel!.id; } catch (err) { if (!mounted) return; context.showErrorDialog(err); @@ -232,6 +237,8 @@ class _ChatRoomScreenState extends State { void dispose() { _wsSubscription?.cancel(); _messageController.dispose(); + final nty = context.read(); + nty.skippableNotifyChannel = null; super.dispose(); } diff --git a/pubspec.yaml b/pubspec.yaml index 29eee76..fe96b1e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.3.2+73 +version: 2.3.2+74 environment: sdk: ^3.5.4