Skip to content

refactor: tweak tab index saving#77

Merged
pd4d10 merged 1 commit intomasterfrom
patch-1
May 1, 2020
Merged

refactor: tweak tab index saving#77
pd4d10 merged 1 commit intomasterfrom
patch-1

Conversation

@pd4d10
Copy link
Copy Markdown
Owner

@pd4d10 pd4d10 commented May 1, 2020

  • Move activeTab variable to auth model
  • Drop CupertinoTabController and use auth.activeTab as the single source of truth
  • Move setActiveTab method from build to account select handler
  • Comment GhGistsScreen temporarily since it is not submitted yet

@pd4d10 pd4d10 requested a review from shreyas1599 May 1, 2020 10:10
Copy link
Copy Markdown
Contributor

@shreyas1599 shreyas1599 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this looks great. I'm learning a lot from you on how to write cleaner code. Thanks for that!

Edit: @pd4d10 A question though: Why'd you move everything to auth.dart? Why not make the changes in theme.dart itself?

@pd4d10 pd4d10 merged commit 508f986 into master May 1, 2020
@pd4d10 pd4d10 deleted the patch-1 branch May 1, 2020 11:06
@pd4d10
Copy link
Copy Markdown
Owner Author

pd4d10 commented May 2, 2020

move everything to auth.dart

Because we have to access the activeAccount.platform variable in auth model to save the tab index with corresponding.

It seems the provider lib has a ProxyProvider which could combine multiple providers, while we don't use it yet.

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.

2 participants