-
Notifications
You must be signed in to change notification settings - Fork 221
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
On launch go to last account used, not just first in list #524
Comments
This issue is definitely not suitable for a new contributor. I got lost at the different instances of it. |
Good feedback, thanks. I just edited that paragraph to expand most of the "it"s into more explicit references. But yeah, as I said above, there are other reasons this isn't a suitable issue for a new contributor. |
And in any case it's an Android-specific platform feature, so it's not suitable for a cross-platform Flutter app. We already do have a SQLite database, so it won't be hard to use that; it's just that we'll have to pick what style we want to use to organize the internal API of how our application code talks to our storage layer in |
In my initial implementation of #516, when you launch the app, we'll navigate to the inbox for the first account in your list of accounts. For most users, this will be their only account.
But for those of us who do have more than one account we're logged in as, the first one in the list might not be the one we most often want to use; it's just the first one the user logged in as after installing the app. So it'd be more convenient to instead go to the account most recently used, which is much more likely to be the one the user is interested in seeing now.
Doing this probably means adding a bit more data to our local database: probably a small new table, named perhaps like "navigation", always with just one row, and perhaps at first just one column which is an account ID. Then
GlobalStore
will have a corresponding field, andLiveGlobalStore.load
will read the table at startup, just like the accounts table.To update the data… perhaps supply a
NavigatorObserver
that looks for newly-pushed routes that are instances ofAccountPageRouteMixin
, so therefore carry an account ID, and when theNavigatorObserver
sees such a route, the observer causes that account ID value to get written if it's different from the existing value.We don't have a lot of examples yet of using the database, so this is an issue that will call for some experimenting with the API and finding the style we want to use. It's therefore not a suitable issue for a new contributor.
The text was updated successfully, but these errors were encountered: