Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide sync library option when sync is disabled #1275

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Sep 12, 2024

  1. 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
    FuSan21 committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    089d804 View commit details
    Browse the repository at this point in the history
  2. 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]>
    FuSan21 and jobobby04 authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    799eb45 View commit details
    Browse the repository at this point in the history
  3. Fix sync service state update in LibraryScreenModel

    - Resolve ambiguity in lambda parameters
    - Correctly update isSyncEnabled state based on syncService value
    FuSan21 committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    4b56476 View commit details
    Browse the repository at this point in the history
  4. 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
    FuSan21 committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    a3b3913 View commit details
    Browse the repository at this point in the history