Before fixing the Category Removal Bug (commit 58537281), the "Default" Category would be empty when removing a populated category.
So when there is only one Category left, and the user hides that one Category, `tabCount` would be <= 0, leading to an Exception:
```
_AssertionError ('package:flutter/src/material/tab_controller.dart': Failed assertion: line 116 pos 15: 'initialIndex >= 0 && (length == 0 || initialIndex < length)': is not true.)
```
Now there is a check (`tabCount <= 0`), that IF tabCount is ever <= 0, it would show `_bodyWithoutCategories`.
When removing a category, the items inside the category were not being updated, removing the link to the removed category.
That lead to the items disappearance from the library.
Now the reference from the item to the deleted category is deleted. Those items show up in the "Default" category.
Merge `fetchMangaSourcesListProvider`, `fetchAnimeSourcesListProvider` and `fetchNovelSourcesListProvider` into a single Provider, `FetchItemSourcesListProvider`, reducing code duplication.
There was a bug when uninstalling an extension and trying to reinstall it, it didn't install.
You had to restart the app to reinstall the same extension again.
Now the provider is invalidated when reinstalling an uninstalled extension,
so the fetch logic is triggered correctly. Prevents stale cache issues from
Riverpod's keepAlive behavior.
```
Exception has occurred.
ArgumentError (Invalid argument(s): No host specified in URI )
```
at line 79:
`final req = await http.get(Uri.parse(source.sourceCodeUrl!));`
when source.sourceCodeUrl is empty.
The Button "Edit Categories" (now called "set Categories"), now opens the category select menu instead of the category edit menu.
This makes more sense in the library item detail view. For example you have the categories "Watching" and "Finished". You just finished an anime and you want to change its category directly in the detail view. Now you can.
Before you had to exit the detail view, go in to the library view, long press the item, tap the category button and then edit it there.
Fix exception when using "Select Widget Mode" of the Flutter Inspector:
```
Exception has occurred.
FlutterError (Tried to modify a provider while the widget tree was building.
If you are encountering this error, chances are you tried to modify a provider
in a widget life-cycle, such as but not limited to:
- build
- initState
- dispose
- didUpdateWidget
- didChangeDependencies
Modifying a provider inside those life-cycles is not allowed, as it could
lead to an inconsistent UI state. For example, two widgets could listen to the
same provider, but incorrectly receive different states.
To fix this problem, you have one of two solutions:
- (preferred) Move the logic for modifying your provider outside of a widget
life-cycle. For example, maybe you could update your provider inside a button's
onPressed instead.
- Delay your modification, such as by encapsulating the modification
in a `Future(() {...})`.
This will perform your update after the widget tree is done building.)
```