From e4e15d31af0256dd7ae0d9cf6a215231b7a7664b Mon Sep 17 00:00:00 2001 From: Levi Lesches Date: Wed, 30 Oct 2024 06:48:17 -0400 Subject: [PATCH] Fix: update logs when device or level filters change --- lib/src/models/view/logs.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/models/view/logs.dart b/lib/src/models/view/logs.dart index 84176afa4..60e6de6b0 100644 --- a/lib/src/models/view/logs.dart +++ b/lib/src/models/view/logs.dart @@ -135,6 +135,7 @@ class LogsViewModel with ChangeNotifier { /// Listens for incoming logs. LogsViewModel() { + options.addListener(notifyListeners); scrollController = ScrollController( onAttach: _listenForScroll, onDetach: _stopListeningForScroll, @@ -146,6 +147,8 @@ class LogsViewModel with ChangeNotifier { @override void dispose() { + options.removeListener(notifyListeners); + options.dispose(); models.logs.removeListener(onNewLog); super.dispose(); }