chore: Update docs of recent transaction screen#3090
chore: Update docs of recent transaction screen#3090niyajali merged 3 commits intoopenMF:developmentfrom
Conversation
📝 WalkthroughWalkthroughThis pull request establishes the recent transactions feature module by introducing dependency injection configuration, navigation API extensions, network-aware state management in the ViewModel, and documentation comments. The ViewModel is enhanced to monitor network connectivity and coordinate data fetching based on online/offline status. Changes
Sequence Diagram(s)sequenceDiagram
participant VM as RecentTransactionViewModel
participant NM as NetworkMonitor
participant UR as UserPreferencesRepository
participant UI as RecentTransactionScreen
VM->>NM: Observe network status (on init)
loop Network Status Changes
NM->>VM: Emit online/offline state
VM->>VM: ReceiveNetworkResult action
alt Status is Online
VM->>UR: Fetch accounts & load transactions
UR->>VM: Return data
VM->>UI: Update UI state
else Status is Offline
VM->>UI: Update network status in UI
end
end
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
feature/recent-transaction/src/commonMain/kotlin/org/mifos/mobile/feature/recent/transaction/viewmodel/RecentTransactionViewModel.kt (1)
146-180: Keep filter state consistent when dismissing/clearing filters.
DismissFilterclearsfilterAccount, whileClearFilterdoes not. SincehasActiveFiltersdepends onfilterAccount, this can disable “Clear All” when an account filter is still active, and keep it enabled after clearing. Consider moving the reset toClearFilterand leavingDismissFilterunchanged.🔧 Suggested fix
is RecentTransactionAction.DismissFilter -> updateState { it.copy( dialogState = null, - filterAccount = null, ) } ... is RecentTransactionAction.ClearFilter -> { val firstAccount = state.accounts.firstOrNull() updateState { it.copy( selectedAccount = firstAccount, filterType = TransactionFilterType.ALL, dialogState = null, + filterAccount = null, ) } loadTransactionsAfterFilter() }
Fixes - 439
updated the documentation of feature/recent-transaction-screen
Didn't create a Jira ticket, click here to create new.
Please Add Screenshots If there are any UI changes.
Please make sure these boxes are checked before submitting your pull request - thanks!
Run the static analysis check
./gradlew checkorci-prepush.shto make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.