Pre-select per-contact categories for login type NextcloudLogin (#774)

* Pre-select per-contact categories for login type NextcloudLogin

* Update the group method unconditionally to suggested group method
This commit is contained in:
Sunik Kupfer 2024-05-02 12:32:23 +02:00 committed by GitHub
parent e40fa6e0fb
commit aafcb2e94a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import at.bitfire.dav4jvm.exception.DavException
import at.bitfire.dav4jvm.exception.HttpException
import at.bitfire.davdroid.db.Credentials
import at.bitfire.davdroid.ui.setup.LoginInfo
import at.bitfire.vcard4android.GroupMethod
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runInterruptible
import kotlinx.coroutines.withContext
@ -107,7 +108,8 @@ class NextcloudLoginFlow(
credentials = Credentials(
username = json.getString("loginName"),
password = json.getString("appPassword")
)
),
suggestedGroupMethod = GroupMethod.CATEGORIES
)
}

View file

@ -80,6 +80,7 @@ class LoginScreenModel @Inject constructor(
?: loginInfo.baseUri?.host
?: ""
updateAccountNameAndEmails(initialAccountName, emails)
updateGroupMethod(loginInfo.suggestedGroupMethod)
page = Page.AccountDetails
}