Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements real pull-to-refresh state tracking by introducing an EventsSyncStateHolder that monitors ongoing sync operations and reflects their status in the UI.
Changes:
- Added
EventsSyncStateHolderto track which events are currently syncing - Integrated sync state tracking into both iOS and Android
EventsSyncManagerimplementations - Updated
ExpensesViewModelto use the newPullToRefreshStateManagerthat combines sync state with user-triggered refresh
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| android/shared/feature/events/src/commonMain/kotlin/com/inwords/expenses/feature/events/domain/EventsSyncStateHolder.kt | New class to hold and expose sync state for events |
| android/shared/feature/sync/src/iosMain/kotlin/com/inwords/expenses/feature/sync/data/EventsSyncManager.ios.kt | Tracks syncing events in a MutableStateFlow and exposes sync state |
| android/shared/feature/sync/src/androidMain/kotlin/com/inwords/expenses/feature/sync/data/SyncManager.android.kt | Implements sync state tracking via WorkManager tags |
| android/shared/feature/expenses/src/commonMain/kotlin/com/inwords/expenses/feature/expenses/ui/list/PullToRefreshStateManager.kt | New manager combining sync state with user-triggered refresh delays |
| android/shared/feature/expenses/src/commonMain/kotlin/com/inwords/expenses/feature/expenses/ui/list/ExpensesViewModel.kt | Refactored to use sync state holder and new refresh manager |
| android/shared/feature/sync/src/commonMain/kotlin/com/inwords/expenses/feature/sync/domain/EventsSyncObserver.kt | Observes sync state and updates EventsSyncStateHolder |
| android/shared/feature/events/src/commonMain/kotlin/com/inwords/expenses/feature/events/api/EventsComponent.kt | Renamed property from eventDeletionStateManager to eventDeletionStateManagerLazy and added eventsSyncStateHolderLazy |
| android/shared/integration/base/src/commonMain/kotlin/com/inwords/expenses/integration/base/MainNavHost.kt | Updated references to use renamed lazy properties |
| android/shared/feature/sync/src/androidMain/kotlin/com/inwords/expenses/feature/sync/data/SyncWorkers.kt | Added common tag for all sync workers and made constant internal |
| android/shared/feature/expenses/src/commonMain/kotlin/com/inwords/expenses/feature/expenses/domain/ExpensesInteractor.kt | Renamed method from onRefreshExpensesAsync to enqueueAsyncExpensesRefresh |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ses/src/commonMain/kotlin/com/inwords/expenses/feature/expenses/ui/list/ExpensesViewModel.kt
Outdated
Show resolved
Hide resolved
1e96881 to
d916cef
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 22 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...commonMain/kotlin/com/inwords/expenses/feature/expenses/ui/list/PullToRefreshStateManager.kt
Show resolved
Hide resolved
...commonMain/kotlin/com/inwords/expenses/feature/expenses/ui/list/PullToRefreshStateManager.kt
Show resolved
Hide resolved
...ses/src/commonMain/kotlin/com/inwords/expenses/feature/expenses/ui/list/ExpensesViewModel.kt
Show resolved
Hide resolved
...re/sync/src/commonMain/kotlin/com/inwords/expenses/feature/sync/domain/EventsSyncObserver.kt
Show resolved
Hide resolved
d09a188 to
4e494a0
Compare
4e494a0 to
2bca5d5
Compare
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.
No description provided.