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

Overview toolbar balance refacto #80

Closed
AndreMiras opened this issue Aug 3, 2017 · 0 comments
Closed

Overview toolbar balance refacto #80

AndreMiras opened this issue Aug 3, 2017 · 0 comments

Comments

@AndreMiras
Copy link
Owner

AndreMiras commented Aug 3, 2017

The way the balance toolbar gets updated is currently buggy and requires a refactoring.

Balance needs to be fetched and cached when:

  • account address changed

Overview toolbar title needs to show balance when:

  • Overview MDBottomNavigationItem is shown (from the OverviewScreen.OverviewBottomNavigation)

This usually happens when the "Overview" is explicitly clicked or when coming back from another screen e.g. account selection. The problem is when coming back from account selection, only the parent screen OverviewScreen gets its on_pre_enter event fired. So the sub-screen doesn't know it's being shown and can't update the Toolbar title. Also another issue is that we cannot systematically load the Toolbar title with balance on OverviewScreen.on_pre_enter since this can also be fired from the "Send" or "Receive" sub-screens. So we need to find a way to know which sub-screen is being loaded.

The last annoying thing is that balance update is done asynchronously, so we need to bind the title to be updated on balance update, but only when the overview subscreen is selected...

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

No branches or pull requests

1 participant