-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: Refactor SavedTripsScreen with LaunchedEffect and add LoadSavedTr…
…ips event (#260) ### TL;DR Added a LoadSavedTrips event and improved the SavedTrips screen initialization. ### What changed? - Added a new `LoadSavedTrips` event to `SavedTripUiEvent` sealed interface. - Replaced the `isActive` state flow in `SavedTripsViewModel` with a direct call to `loadSavedTrips()` using `LaunchedEffect` in `SavedTripsDestination`. - Removed the `ANR_TIMEOUT` constant and related code from `SavedTripsViewModel`. - Added a spacer at the bottom of the `TimeTableScreen` to improve layout. ### Why make this change? This change simplifies the initialization process for the SavedTrips screen by using a more direct approach to load saved trips. It removes unnecessary complexity related to the `isActive` state flow and improves the overall user experience by ensuring saved trips are loaded immediately upon screen entry. The added spacer in the TimeTable screen enhances the layout and prevents content from being obscured by system bars or other UI elements. https://github.com/user-attachments/assets/c664863c-3096-446e-87fe-28a7e2c5a066
- Loading branch information
1 parent
34adc73
commit 949ae6f
Showing
4 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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