File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ class Presence extends HasRealmStore with ChangeNotifier {
9696 newUserInput: false );
9797 }
9898 if (! pingOnly) {
99- _map = result.presences! ;
100- notifyListeners ();
99+ _handlePresenceResponse (result.presences! );
101100 }
102101 }
103102
@@ -124,6 +123,16 @@ class Presence extends HasRealmStore with ChangeNotifier {
124123 super .dispose ();
125124 }
126125
126+ @visibleForTesting
127+ void debugHandlePresenceResponse (Map <int , PerUserPresence > presences) {
128+ _handlePresenceResponse (presences);
129+ }
130+
131+ void _handlePresenceResponse (Map <int , PerUserPresence > presences) {
132+ _map = presences;
133+ notifyListeners ();
134+ }
135+
127136 /// The [PresenceStatus] for [userId] , or null if the user is offline.
128137 PresenceStatus ? presenceStatusForUser (int userId, {required DateTime utcNow}) {
129138 final now = utcNow.millisecondsSinceEpoch ~ / 1000 ;
You can’t perform that action at this time.
0 commit comments