forked from Nexus/nexus
general cleanups and mounted guards
This commit is contained in:
parent
62e200f305
commit
0a09a4ee0a
1 changed files with 33 additions and 22 deletions
|
|
@ -60,6 +60,8 @@ class const SelectServerPage({super.key}) extends HookConsumerWidget {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!context.mounted) return;
|
||||
|
||||
await ref.read(LaunchHelper.provider).launchUrl(codeResponse.url);
|
||||
|
||||
AppLinks().uriLinkStream.listen((encodedUri) async {
|
||||
|
|
@ -70,7 +72,7 @@ class const SelectServerPage({super.key}) extends HookConsumerWidget {
|
|||
try {
|
||||
final code = encodedUri.queryParameters["code"];
|
||||
|
||||
if (code != null) {
|
||||
if (code != null && context.mounted) {
|
||||
await ref
|
||||
.read(ClientController.provider.notifier)
|
||||
.exchangeToken(
|
||||
|
|
|
|||
Loading…
Reference in a new issue