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

TimeTable: Improve journey cleanup and started/ended states #438

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Dec 8, 2024

Improve journey cache management and cleanup

Adds logic to remove completed journeys from the cache and introduces a new threshold to limit the number of started journeys displayed. Previously, started journeys would remain in the cache indefinitely.

  • Added hasJourneyStarted and hasJourneyEnded properties to determine journey status
  • Removes journeys that have reached their destination time
  • Limits displayed started journeys to a maximum of 3
  • Renames internal trips map to journeys for better clarity

These changes ensure the cache stays clean and only shows relevant journey information to users.

… is active, then

past trips display time from long ago such as 10hrs ago, and are not cleared from cache.
they should be cleared as they are old data
Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ksharma-xyz ksharma-xyz changed the title BugFix: When the app is opened after long time and TimeTableViewModel is active, then past trips display time from long ago such as 10hrs ago, and are not cleared from cache. they should be cleared as they are old data TimeTable: Improve journey cleanup and started/ended states Dec 8, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review December 8, 2024 02:02
@ksharma-xyz ksharma-xyz merged commit c3b267a into main Dec 8, 2024
2 checks passed
Copy link
Owner Author

Merge activity

  • Dec 7, 9:11 PM EST: A user merged this pull request with Graphite.

@ksharma-xyz ksharma-xyz deleted the 12-08-bugfix_when_the_app_is_opened_after_long_time_and_timetableviewmodel_is_active_then_past_trips_display_time_from_long_ago_such_as_10hrs_ago_and_are_not_cleared_from_cache._they_should_be_cleared_as_they_are_old_data branch December 8, 2024 02:11
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