Closed sunkup closed 2 weeks ago
@rfc2822
I noticed that currently the nextcloud login flow can not be started via intent. There seems to exist intentToInitialLoginType()
but it does not have any usages. So starting via an intent ala
adb shell am start -e loginFlow nextcloud at.bitfire.davdroid/at.bitfire.davdroid.ui.setup.LoginActivity
currently does nothing.
The login type should of course be changed accordingly to the presence of the intent extra, but that may be outside the scope of this PR.
Issue here: https://github.com/bitfireAT/davx5-ose/issues/773
- Wrapping the "initial login data" lines into
if (savedInstanceState == null)
should help. Then the code should only be executed on the first creation, but not on re-creation.
The code is only run once now. Re-creation / rotation still looses user changes though ...
The code is only run once now. Re-creation / rotation still looses user changes though ...
Hm really? For instance when I'm on the last (account details) page and rotate the screen, it now stays on that page.
Hm really? For instance when I'm on the last (account details) page and rotate the screen, it now stays on that page.
Yes, directly after launching the intent, still on the login details page: try changing the text in the input fields. Ie base URL, user name or password. When rotating the screen the changes are reset.
Purpose
DAVx5 should start with the login details page automatically when the login type is determined by the Intent.
Short description
When the
intent.data
is not empty a new methodnavToPage
is called, which sets the active page to be the login details page. This is by default of typeUrlLogin
, so we currently don't need to set it explicitly.Checklist