Skip to content

Add sync library button to settings#18

Merged
chamika merged 3 commits into
mainfrom
feature/settings-sync-button
May 3, 2026
Merged

Add sync library button to settings#18
chamika merged 3 commits into
mainfrom
feature/settings-sync-button

Conversation

@chamika
Copy link
Copy Markdown
Owner

@chamika chamika commented May 2, 2026

Summary

  • Adds a Sync library preference to the settings screen (between Browse categories and App version)
  • Displays the last sync date/time as the preference subtitle; shows "Never synced" if never synced
  • Tapping the preference connects to DashTuneMusicService via MediaController, sends SYNC_COMMAND, and refreshes the subtitle on success
  • Disables the preference during sync to prevent double-taps
  • Also fixes SYNC_COMMAND in DashTuneSessionCallback to return RESULT_ERROR on failure and show a "Sync failed" toast (previously silent)

Test plan

  • Open Settings → confirm "Sync library" appears with correct subtitle ("Never synced" or a date)
  • Tap "Sync library" → preference disables while syncing → "Library synced" toast appears → subtitle updates to current date/time → preference re-enables
  • Simulate sync failure (e.g. no network) → "Sync failed" toast appears → subtitle unchanged
  • Verify auto-sync (on network available) does not immediately re-trigger after a manual sync from settings

🤖 Generated with Claude Code

chamika and others added 3 commits May 2, 2026 12:33
Exposes a 'Sync library' preference that lets users manually trigger a
library sync from settings. Shows last sync date/time as the subtitle,
updates it on success, and disables the preference while sync is in
progress to prevent double-taps. Also fixes the sync command to return
a proper error result and show a failure toast when sync fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add sync library button to settings

Full release notes:

- Add Sync library button to settings screen
- Show last synced date and time as subtitle beneath the button
- Fix sync command to show a failure toast and return an error result when sync fails
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chamika chamika merged commit 39096bc into main May 3, 2026
1 check passed
@chamika chamika deleted the feature/settings-sync-button branch May 16, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant