Skip to content

Commit 596bb64

Browse files
Merge pull request #13 from strvcom/mu/fix/event_notifier
fix: Force EventNotifier to notify all updates
2 parents 26de268 + 0c11729 commit 596bb64

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -562,16 +562,7 @@ For the purpose of Fraud prevention, user safety, and compliance the dedicated A
562562
<!-- ########## TODOs ######### -->
563563
<!-- ################################################## -->
564564
# Todos
565-
- Investigate Github action caching
566-
- Fix crashlytics upload mapping symbols in Github actions
567-
- Implements secret handling
568-
- API keys
569-
- Keystores for Android
570-
- Service accounts
571-
- Google service json
572-
- iOS Xcode properties with .env files
573565
- Fix Riverpod async gaps - analytics manager (keep live)
574-
- Fix EventNotifier - change updateShouldNotify to return true (in case user returns back to the screen and emits the same value)
575566
- Revisit Google and Apple logins - Providers, Cancellation exception, separating Credentials from Sign In. USe Firebase directly for Apple on Android.
576567
- Refactor Sealed classes - private classes, use generated `when` function instead of switch.
577568

lib/core/riverpod/event_notifier.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,11 @@ class EventNotifier<T> extends Notifier<T?> {
1515
T? build() {
1616
return state;
1717
}
18+
19+
/// Always returns true to ensure listeners are notified even when the same event is emitted multiple times.
20+
/// Addresses navigation scenarios where the same event needs to be processed multiple times (e.g. when navigating back and forth).
21+
@override
22+
bool updateShouldNotify(T? previous, T? next) {
23+
return true;
24+
}
1825
}

0 commit comments

Comments
 (0)