-
-
Notifications
You must be signed in to change notification settings - Fork 79
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 setup through nextcloud app (intent) not working #782
Fix setup through nextcloud app (intent) not working #782
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use the initial data approach here too:
- pass
initialLoginType
&initialloginInfo
to theLoginScreen
LoginScreen
injects/creates the model with the initial data in the constructor
Then we could get rid of the if (savedInstanceState == null)
and have better separation of concerns (no direct model access from outside).
While it would have been possible (and shorter in code) I have added an extra startPage parameter as well. The alternative is to infer the starting page from the login type inside the model, which is shorter, but less flexible. I can change that back if you prefer :) The advantage would be that future intents could start the correct login page more easily. |
2f75db0
to
f4e2dd4
Compare
app/src/main/kotlin/at/bitfire/davdroid/ui/setup/LoginActivity.kt
Outdated
Show resolved
Hide resolved
f4e2dd4
to
488642a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
161a7be
to
8b81a02
Compare
- Use boolean to decide on skipping startPage - Move login type selection logic to login types provider
8b81a02
to
2f9fdee
Compare
Purpose
The nextcloud login/setup flow could not be started via intent. This fixes it.
Short description
LoginActivity:
intentToInitialLoginType()
to determine login type from intent.selectLoginType()
to change the login type accordinglyLoginScreenModel:
selectLoginType()
to also update the ui state of the login details page. Previously it only updated the ui state of the login type page.See also: Creation of intent in nextcloud app.
Testing
Intent for testing:
Checklist