Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 17ccb305 authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Configuration detection: allow null Credentials (anonymous login) (bitfireAT/davx5#323)

parent 37a7ebb9
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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