mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-07-23 11:39:15 +00:00
Configuration detection: allow null Credentials (anonymous login) (bitfireAT/davx5#323)
This commit is contained in:
parent
37a7ebb9c0
commit
17ccb305f9
|
@ -38,9 +38,8 @@ class DetectConfigurationFragment: Fragment() {
|
|||
super.onCreate(savedInstanceState)
|
||||
|
||||
val baseURI = loginModel.baseURI ?: return
|
||||
val credentials = loginModel.credentials ?: return
|
||||
|
||||
model.detectConfiguration(baseURI, credentials).observe(this) { result ->
|
||||
model.detectConfiguration(baseURI, loginModel.credentials).observe(this) { result ->
|
||||
// save result for next step
|
||||
loginModel.configuration = result
|
||||
|
||||
|
@ -68,7 +67,7 @@ class DetectConfigurationFragment: Fragment() {
|
|||
private var detectionThread: WeakReference<Thread>? = null
|
||||
private var result = MutableLiveData<DavResourceFinder.Configuration>()
|
||||
|
||||
fun detectConfiguration(baseURI: URI, credentials: Credentials): LiveData<DavResourceFinder.Configuration> {
|
||||
fun detectConfiguration(baseURI: URI, credentials: Credentials?): LiveData<DavResourceFinder.Configuration> {
|
||||
synchronized(result) {
|
||||
if (detectionThread != null)
|
||||
// detection already running
|
||||
|
|
Loading…
Reference in a new issue