@@ -6,7 +6,7 @@ import 'package:flutter/widgets.dart';
6
6
import '../api/model/events.dart' ;
7
7
import '../api/model/model.dart' ;
8
8
import '../api/route/users.dart' ;
9
- import 'store .dart' ;
9
+ import 'realm .dart' ;
10
10
11
11
/// The model for tracking which users are online, idle, and offline.
12
12
///
@@ -16,21 +16,12 @@ import 'store.dart';
16
16
/// so callers need to remember to add a listener (and remove it on dispose).
17
17
/// In particular, [PerAccountStoreWidget] doesn't subscribe a widget subtree
18
18
/// to updates.
19
- class Presence extends PerAccountStoreBase with ChangeNotifier {
19
+ class Presence extends HasRealmStore with ChangeNotifier {
20
20
Presence ({
21
- required super .core,
22
- required this .serverPresencePingInterval,
23
- required this .serverPresenceOfflineThresholdSeconds,
24
- required this .realmPresenceDisabled,
21
+ required super .realm,
25
22
required Map <int , PerUserPresence > initial,
26
23
}) : _map = initial;
27
24
28
- final Duration serverPresencePingInterval;
29
- final int serverPresenceOfflineThresholdSeconds;
30
- // TODO(#668): update this realm setting (probably by accessing it from a new
31
- // realm/server-settings substore that gets passed to Presence)
32
- final bool realmPresenceDisabled;
33
-
34
25
Map <int , PerUserPresence > _map;
35
26
36
27
AppLifecycleListener ? _appLifecycleListener;
0 commit comments