Fix "Show extensions" Button AND Fix category rearrange bug AND hide ItemType from calendar#636
Merged
kodjodevf merged 23 commits intokodjodevf:mainfrom Jan 5, 2026
Merged
Fix "Show extensions" Button AND Fix category rearrange bug AND hide ItemType from calendar#636kodjodevf merged 23 commits intokodjodevf:mainfrom
kodjodevf merged 23 commits intokodjodevf:mainfrom
Conversation
Extract the `_updateLibrary()` function from `updates_screen.dart` and `library_screen.dart` to a top-level function in `libray_updater.dart`.
- Use the logger to log failed updates - After the update-botToast another botToast is being spawned to show exactly which manga(s) couldn't be updated. - Remove the doWhile loop because it is unnecessary. The condition of mangaList.length == numbers is always true, meaning it only runs once.
No need to pass hideItems down, they all can use the top hideItems variable. It's never changed.
The previous version was just unnecessarily complicated, hard to read. New version is very easy to read.
Use the _visibleTabTypes list instead of the repeated if-statements.
- remove hideItems parameter - Make TabBar and TabBarView cleaner
Reduce duplication
- Extract localizedItemType() from `base_library_tab_screen.dart` - Add localizedSources() and localizedExtensions() for browse_screen.dart - Reduce if-statements in statistics_screen.dart - Reduce if-statements in categories_screen.dart - Reduce if-statements in browse_screen.dart
The "Show extensions" Button was not working properly when categories were hidden.
An Exception would throw:
```
_AssertionError ('package:flutter/src/material/tab_controller.dart': Failed assertion: line 202 pos 12: 'value >= 0 && (value < length || length == 0)': is not true.)
```
And jump to the end of the tab list regardless of where you clicked the button.
- new file item_type_filters.dart for the hiddenItemTypes function. - reduces code duplication in statistics_screen, categories_screen and base_library_tab_screen
_updateCategoriesOrder() is now async
When rearranging categories in the Manga library, all categories in Anime and Novel were being deleted.
And add comments
When the user has hidden Manga or Anime or Novel, hide the buttons in the calendar.
Don't show manga calendar if manga is hidden.
for better readability
- compare integers instead of Strings - cache results per day
- avoids extra text file - simplify RenderBox lookup
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
kodjodevf
approved these changes
Jan 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix "Show extensions" Button
An _AssertionError Exception would throw.
And jump to the end of the tab list regardless of where you clicked the button.
Fix category rearrange bug
Hide ItemType in calendar
Reduce Code Duplication
_updateLibrary()function fromupdates_screen.dartandlibrary_screen.dartto a top-level function inlibray_updater.dart.updates_screen.dartandhistory_screen.dart) into base classbase_library_tab_screen.dartlocalizedItemType()function frombase_library_tab_screen.dart,statistics_screen.dartandcategories_screen.dartto an extension initem_type_localization.dartlocalizedSources()andlocalizedExtensions()for browse_screen.dart toitem_type_localization.dartitem_type_filters.dartfor the hiddenItemTypes function.categories_screen.dartinto a helper method.Extract helper methods in
calendar_screen.dart, making it more readable.Improve performance of method
_getEntriesForDay()in calendar