Compare commits
3 changed files with 9 additions and 10 deletions
11
flake.lock
generated
11
flake.lock
generated
|
|
@ -42,16 +42,15 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1789876218,
|
"lastModified": 1774860670,
|
||||||
"narHash": "sha256-/sUFGNLvcwf9MxGw+QS24o1bg217fQRY9NpinlmSjH4=",
|
"narHash": "sha256-YjJkQrvxrErXtfDi3obUn6rNmkA+CIAZ3f5NgL5xuYE=",
|
||||||
"owner": "Henry-Hiles",
|
"owner": "neobrain",
|
||||||
"repo": "nix2flatpak",
|
"repo": "nix2flatpak",
|
||||||
"rev": "8264b886c1e64bffc172c49e9dfcb551cbd863f4",
|
"rev": "61d68e21e3fbc2d57590051f48736bea271f4aba",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Henry-Hiles",
|
"owner": "neobrain",
|
||||||
"ref": "quad/fix/names",
|
|
||||||
"repo": "nix2flatpak",
|
"repo": "nix2flatpak",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
self.submodules = true;
|
self.submodules = true;
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nix2flatpak.url = "github:Henry-Hiles/nix2flatpak/quad/fix/names";
|
nix2flatpak.url = "github:neobrain/nix2flatpak";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
||||||
await ref
|
await ref
|
||||||
.watch(PushKeyController.provider(instance).notifier)
|
.watch(PushKeyController.provider(instance).notifier)
|
||||||
.set(null);
|
.set(null);
|
||||||
ref.invalidateSelf();
|
state = .data(false);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
||||||
vapid: capabilities.webpush?.vapid,
|
vapid: capabilities.webpush?.vapid,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!alreadyRegistered) ref.invalidateSelf();
|
state = .data(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> deregister() async {
|
Future<void> deregister() async {
|
||||||
|
|
@ -157,7 +157,7 @@ class UnifiedPushController extends AsyncNotifier<bool> {
|
||||||
}
|
}
|
||||||
|
|
||||||
await UnifiedPush.unregister(clientState.deviceId!);
|
await UnifiedPush.unregister(clientState.deviceId!);
|
||||||
ref.invalidateSelf();
|
state = .data(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final provider = AsyncNotifierProvider<UnifiedPushController, bool>(
|
static final provider = AsyncNotifierProvider<UnifiedPushController, bool>(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue