Merge `isLongPressedMangaStateProvider` and `isLongPressedStateProvider`
Both providers do the same thing and it is impossible to change the value of the provider in different places in the app at the same time.
So just use one `isLongPressedStateProvider`. Reduces code duplication and there is no confusion about which one to use.
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" }`
Previously, the same select bar and button styles were defined in both
`library_screen.dart` and `manga_detail_view.dart`, resulting in repeated code.
This commit extracts the select bar and its buttons into reusable widgets
to reduce duplication and improve readability and maintainability.
- variable `color`, to avoid passing `Theme.of(context).textTheme.bodyLarge!.color!` on every Icon in `bottomNavigationBar`
- No need to create variable `isLongPressed` and `chapterNameList` in `build()` and pass them to `_buildWidget()` if they are only going to be used there. Just create the variables inside `_buildWidget()`
- Why create second `isLongPressed` variable in `_buildWidget()` with the same value? Just use the first one.
The initialization of discordRPC on iOS and Android was leading to a grey screen (UnimplementedError), preventing the app to paint the Flutter UI.
The flutter_discord_rpc is only available on macOS, Linux and Windows.
flutter already brings some libraries and when building the AppImage with linuxdeploy, it bundles some libraries again. Duplicate libraries leads to bigger AppImage size.
This was unintentionally removed in d21dbbbc.
This caused fullscreen mode to persist when the user exited the anime player view before the video had started loading.
The fullscreen now correctly exits in the dispose method for desktop platforms again.