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 {
96
96
newUserInput: false );
97
97
}
98
98
if (! pingOnly) {
99
- _map = result.presences! ;
100
- notifyListeners ();
99
+ _handlePresenceResponse (result.presences! );
101
100
}
102
101
}
103
102
@@ -124,6 +123,16 @@ class Presence extends HasRealmStore with ChangeNotifier {
124
123
super .dispose ();
125
124
}
126
125
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
+
127
136
/// The [PresenceStatus] for [userId] , or null if the user is offline.
128
137
PresenceStatus ? presenceStatusForUser (int userId, {required DateTime utcNow}) {
129
138
final now = utcNow.millisecondsSinceEpoch ~ / 1000 ;
You can’t perform that action at this time.
0 commit comments