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

UI: Fix stops count display in LegView component #441

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

ksharma-xyz
Copy link
Owner

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

TL;DR

Updated stop count display logic in LegView component to show accurate intermediate stop counts

What changed?

  • Modified the stop count calculation to show the number of intermediate stops (total stops - 1)
  • Simplified the stop count text to always use plural form "stops"
  • Added state management using mutableIntStateOf for the stops count
  • Adjusted the visibility threshold to show stops count when there are more than 1 intermediate stops

Why make this change?

To provide more accurate information about intermediate stops in a journey. The previous implementation showed the total number of stops, which included both origin and destination, potentially confusing users about the number of intermediate stops in their journey.

Copy link
Owner Author

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

@ksharma-xyz ksharma-xyz changed the title Fix: Stops count logic UI: Fix stops count display in LegView component Dec 8, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review December 8, 2024 10:21
@ksharma-xyz ksharma-xyz merged commit 89b1dbc into main Dec 8, 2024
2 checks passed
@ksharma-xyz ksharma-xyz deleted the 12-08-fix_stops_count_logic branch December 8, 2024 10:40
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