mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-05-06 20:00:30 +00:00
Fix Exception when disconnecting
When restoring a backup, the app tries to disconnect DiscordRPC but that gives an exception, when there is no live IPC socket to close.
`AnyhowException (AnyhowException(Failed to close to Discord IPC: Custom { kind: ConnectionRefused, error: "Couldn't retrieve the Discord IPC socket" }`
This commit is contained in:
parent
36a2232461
commit
cd06ae3e78
1 changed files with 1 additions and 0 deletions
|
|
@ -203,6 +203,7 @@ class DiscordRPC {
|
|||
}
|
||||
|
||||
Future<void> disconnect() async {
|
||||
if (!FlutterDiscordRPC.instance.isConnected) return;
|
||||
await FlutterDiscordRPC.instance.disconnect();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue