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

Add TripResponseMapper #172

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Add TripResponseMapper #172

merged 1 commit into from
Oct 13, 2024

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Oct 13, 2024

TL;DR

Refactored TimeTableViewModel to improve code organization and readability.

What changed?

  • Extracted journey list building logic from TimeTableViewModel to a new file TripResponseMapper.kt.
  • Created two new functions: buildJourneyList() and logForUnderstandingData().
  • Moved interchangeStopsList() function to the new file.
  • Updated TimeTableViewModel to use the new functions.

Why make this change?

This refactoring improves code organization and maintainability by:

  1. Separating concerns: Moving data processing logic out of the ViewModel.
  2. Enhancing readability: Breaking down complex functions into smaller, more focused ones.
  3. Facilitating easier testing and future modifications to the journey list building process.

Copy link
Owner Author

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

Join @ksharma-xyz and the rest of your teammates on Graphite Graphite

@ksharma-xyz ksharma-xyz marked this pull request as ready for review October 13, 2024 01:02
@ksharma-xyz ksharma-xyz enabled auto-merge (squash) October 13, 2024 01:03
@ksharma-xyz ksharma-xyz merged commit 31c03ba into main Oct 13, 2024
1 check passed
@ksharma-xyz ksharma-xyz deleted the 10-13-add_tripresponsemapper branch October 13, 2024 01:08
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