only read stuff in UP controller
This commit is contained in:
parent
2c3b0e0ab9
commit
ea73ae03a9
1 changed files with 5 additions and 5 deletions
|
|
@ -68,7 +68,7 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
|||
event.unreadType?.shouldNotify() != true ||
|
||||
(!isInBackground &&
|
||||
await windowManager.isFocused().onError((_, _) => false) &&
|
||||
await ref.watch(
|
||||
await ref.read(
|
||||
KeyController.provider(KeyController.roomKey).future,
|
||||
) ==
|
||||
event.roomId)) {
|
||||
|
|
@ -122,10 +122,10 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
|||
|
||||
Future<void> register([bool alreadyRegistered = false]) async {
|
||||
final clientStateProvider = ClientStateController.provider;
|
||||
while (ref.watch(clientStateProvider)?.deviceId == null) {
|
||||
while (ref.read(clientStateProvider)?.deviceId == null) {
|
||||
await Future.delayed(.new(milliseconds: 250));
|
||||
}
|
||||
final clientState = ref.watch(clientStateProvider);
|
||||
final clientState = ref.read(clientStateProvider);
|
||||
|
||||
final capabilities = await ref
|
||||
.watch(ClientController.provider.notifier)
|
||||
|
|
@ -151,8 +151,8 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
|||
}
|
||||
|
||||
Future<void> deregister() async {
|
||||
final clientState = ref.watch(ClientStateController.provider);
|
||||
final key = await ref.watch(
|
||||
final clientState = ref.read(ClientStateController.provider);
|
||||
final key = await ref.read(
|
||||
PushKeyController.provider(clientState!.deviceId!).future,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue