diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index aec3b0fb7a..a77e36cb2d 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -16,6 +16,7 @@ import 'package:fluffychat/widgets/mixins/popup_menu_widget_style.dart'; import 'package:fluffychat/widgets/mixins/twake_context_menu_mixin.dart'; import 'package:flutter_typeahead/flutter_typeahead.dart'; import 'package:fluffychat/utils/extension/global_key_extension.dart'; +import 'package:inview_notifier_list/inview_notifier_list.dart'; import 'package:universal_html/html.dart' as html; import 'package:adaptive_dialog/adaptive_dialog.dart'; @@ -1932,7 +1933,7 @@ class ChatController extends State pinnedMessageScrollController.dispose(); onUpdateEventStreamSubcription?.cancel(); keyboardVisibilitySubscription?.cancel(); - + InViewNotifierListCustom.of(context)?.dispose(); replyEventNotifier.dispose(); super.dispose(); } diff --git a/lib/pages/chat/events/message/message.dart b/lib/pages/chat/events/message/message.dart index 3bfec62c5a..c5c9fea97a 100644 --- a/lib/pages/chat/events/message/message.dart +++ b/lib/pages/chat/events/message/message.dart @@ -113,7 +113,6 @@ class _MessageState extends State { void dispose() { inViewState?.removeContext(context: context); inViewState?.removeListener(_inviewStateListener); - inViewState?.dispose(); inviewNotifier.dispose(); super.dispose(); }