diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index e76b2256dd..4b5d930e3b 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -446,6 +446,7 @@ class ChatController extends State timeline = null; inputFocus.removeListener(_inputFocusListener); disposeSearch(); + focusSuggestionController.dispose(); super.dispose(); } diff --git a/lib/pages/chat/input_bar/focus_suggestion_controller.dart b/lib/pages/chat/input_bar/focus_suggestion_controller.dart index 5faf318e2c..06d85c4ba3 100644 --- a/lib/pages/chat/input_bar/focus_suggestion_controller.dart +++ b/lib/pages/chat/input_bar/focus_suggestion_controller.dart @@ -25,4 +25,8 @@ class FocusSuggestionController { currentIndex.value = 0; } } + + void dispose() { + currentIndex.dispose(); + } } diff --git a/lib/pages/chat_draft/draft_chat.dart b/lib/pages/chat_draft/draft_chat.dart index c90a5be4d7..3807303210 100644 --- a/lib/pages/chat_draft/draft_chat.dart +++ b/lib/pages/chat_draft/draft_chat.dart @@ -121,6 +121,7 @@ class DraftChatController extends State sendController.dispose(); forwardListController.dispose(); inputFocus.removeListener(_inputFocusListener); + focusSuggestionController.dispose(); super.dispose(); }