forked from az4521/TachiyomiAZ
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide sync library option when sync is disabled (#1275)
* Hide sync library option when sync is disabled - Add isSyncEnabled parameter to LibraryToolbar and LibraryRegularToolbar - Pass isSyncEnabled from LibraryTab to LibraryToolbar - Conditionally display sync library action based on isSyncEnabled - Update LibraryContent to include isSyncEnabled parameter - Adjust LibraryTab to handle sync-related functionality - Remove direct dependency on SyncPreferences in LibraryToolbar * Update LibraryScreenModel to react to sync service changes - Replace static isSyncEnabled update with dynamic observation - Use syncPreferences.syncService().changes() to update isSyncEnabled state - Ensure isSyncEnabled is updated whenever the sync service changes Co-authored-by: jobobby04 <[email protected]> * Fix sync service state update in LibraryScreenModel - Resolve ambiguity in lambda parameters - Correctly update isSyncEnabled state based on syncService value * Optimize sync service state updates in LibraryScreenModel - Add distinctUntilChanged() to filter out consecutive duplicate emissions - Simplify mutableState.update lambda for better readability - Remove redundant boolean comparison in isSyncEnabled assignment --------- Co-authored-by: jobobby04 <[email protected]>
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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