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

Fix for issue #376: Fix tab highlighting for Single Account navigation #464

Open
wants to merge 1 commit into
base: end
Choose a base branch
from

Conversation

remain-maomao
Copy link

Title: This pull request fixes issue #376 on the end branch by updating the logic in RallyActivity.kt to handle the edge case described in the issue.

Description:
This pull request addresses an issue where the Accounts tab was not highlighted when navigating to a specific single account page in the end version of the code.

Changes Made:

  • Updated the logic to determine the current screen by adding a condition that checks if the current route starts with single_account.
val currentScreen = rallyTabRowScreens.find { it.route == currentDestination?.route || (it == Accounts && currentDestination?.route?.startsWith(SingleAccount.route) == true) } ?: Overview

Explanation:
When navigating to a single account, the page's route can be single_account/Checking, single_account/Home Savings, or single_account/Car Savings. These routes do not match the predefined tab routes (overview, accounts, bills), causing the original code to fall back to the Overview page.

The fix adds a condition to highlight the Accounts tab if the current route starts with single_account, ensuring the correct tab is highlighted.

I hope this resolves the issue effectively. If there are any questions or further changes needed, please let me know.

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