From 28c68905bb65f4f5dd01f6054c2d9f7fafd66ea9 Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Thu, 15 Jan 2026 13:58:46 +0100 Subject: [PATCH 1/2] fix: Force EventNotifier to notify all updates --- README.md | 9 --------- lib/core/riverpod/event_notifier.dart | 7 +++++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 78b51ab..32d7b6f 100644 --- a/README.md +++ b/README.md @@ -562,16 +562,7 @@ For the purpose of Fraud prevention, user safety, and compliance the dedicated A # Todos -- Investigate Github action caching -- Fix crashlytics upload mapping symbols in Github actions -- Implements secret handling - - API keys - - Keystores for Android - - Service accounts - - Google service json - - iOS Xcode properties with .env files - Fix Riverpod async gaps - analytics manager (keep live) -- Fix EventNotifier - change updateShouldNotify to return true (in case user returns back to the screen and emits the same value) - Revisit Google and Apple logins - Providers, Cancellation exception, separating Credentials from Sign In. USe Firebase directly for Apple on Android. - Refactor Sealed classes - private classes, use generated `when` function instead of switch. diff --git a/lib/core/riverpod/event_notifier.dart b/lib/core/riverpod/event_notifier.dart index 86daa6d..4ca169a 100644 --- a/lib/core/riverpod/event_notifier.dart +++ b/lib/core/riverpod/event_notifier.dart @@ -15,4 +15,11 @@ class EventNotifier extends Notifier { T? build() { return state; } + + /// Always returns true to notify even about the same event + /// It was causing issues when navigating back and forth and emitting the same event that was used to navigate + @override + bool updateShouldNotify(T? previous, T? next) { + return true; + } } From 0c11729518af848024dad4253488c2cedcdcec78 Mon Sep 17 00:00:00 2001 From: Michal Urbanek Date: Fri, 16 Jan 2026 10:27:12 +0100 Subject: [PATCH 2/2] fix: Update comments --- lib/core/riverpod/event_notifier.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/riverpod/event_notifier.dart b/lib/core/riverpod/event_notifier.dart index 4ca169a..d3ad3ab 100644 --- a/lib/core/riverpod/event_notifier.dart +++ b/lib/core/riverpod/event_notifier.dart @@ -16,8 +16,8 @@ class EventNotifier extends Notifier { return state; } - /// Always returns true to notify even about the same event - /// It was causing issues when navigating back and forth and emitting the same event that was used to navigate + /// Always returns true to ensure listeners are notified even when the same event is emitted multiple times. + /// Addresses navigation scenarios where the same event needs to be processed multiple times (e.g. when navigating back and forth). @override bool updateShouldNotify(T? previous, T? next) { return true;