mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
chore: clear or disconnect discord on dispose
This commit is contained in:
parent
4f882882e0
commit
40bfcc1961
@ -61,6 +61,7 @@ class DiscordNotifier extends AsyncNotifier<void> {
|
||||
for (final subscription in subscriptions) {
|
||||
subscription.cancel();
|
||||
}
|
||||
await clear();
|
||||
await close();
|
||||
await FlutterDiscordRPC.instance.dispose();
|
||||
});
|
||||
@ -68,7 +69,7 @@ class DiscordNotifier extends AsyncNotifier<void> {
|
||||
if (!enabled && FlutterDiscordRPC.instance.isConnected) {
|
||||
await clear();
|
||||
await close();
|
||||
} else {
|
||||
} else if (enabled) {
|
||||
await FlutterDiscordRPC.instance.connect(autoRetry: true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user