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

refactor: improve DittoService state management #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rdas-ditto
Copy link
Contributor

  • Replace boolean isSyncActive with DittoSyncState enum (.noLicense, .inactive, .active)
  • Update SyncButton to properly observe DittoService state changes
  • Improve state message handling in SyncButton
  • Update documentation to reflect new state management approach

This change improves the reliability of sync state tracking and UI updates while making the codebase more maintainable.

- Replace boolean isSyncActive with DittoSyncState enum (.noLicense, .inactive, .active)
- Update SyncButton to properly observe DittoService state changes
- Improve state message handling in SyncButton
- Update documentation to reflect new state management approach

This change improves the reliability of sync state tracking and UI updates
while making the codebase more maintainable.
@rdas-ditto rdas-ditto requested a review from a team as a code owner January 17, 2025 16:12
try? dittoService.startSyncEngine()
isAnimating = true
case .noLicense:
break // Can't do anything without a license
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we show something in the UI or at least print a log indicating why we're not doing anything to help guide users towards activating properly?

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.

2 participants