Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Keep avatar notifier stable through contact hydration

Neeraj Guptac16e77223b6c
diff --git a/mobile/packages/contacts/lib/src/service/contacts_display_service.dart b/mobile/packages/contacts/lib/src/service/contacts_display_service.dart
index 9718062bda..fd711ea570 100644
--- a/mobile/packages/contacts/lib/src/service/contacts_display_service.dart
+++ b/mobile/packages/contacts/lib/src/service/contacts_display_service.dart
@@ -16,11 +16,11 @@ class ContactsDisplayService {
ValueListenable<int> get changes => _store.revision;
+ /// Known accounts keep the same contact-scoped notifier across hydration.
ValueListenable<int> changesFor({int? contactUserId, String? email}) {
- final resolvedUserId = _resolvedContactUserId(
- contactUserId: contactUserId,
- email: email,
- );
+ final resolvedUserId = contactUserId != null && contactUserId > 0
+ ? contactUserId
+ : _resolvedContactUserId(contactUserId: contactUserId, email: email);
return resolvedUserId == null
? changes
: _store.revisionForContact(resolvedUserId);