Skip to content

Commit

Permalink
Pre-select per-contact categories for login type NextcloudLogin (#774)
Browse files Browse the repository at this point in the history
* Pre-select per-contact categories for login type NextcloudLogin

* Update the group method unconditionally to suggested group method
  • Loading branch information
sunkup authored May 2, 2024
1 parent e40fa6e commit aafcb2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -107,7 +108,8 @@ class NextcloudLoginFlow(
credentials = Credentials(
username = json.getString("loginName"),
password = json.getString("appPassword")
)
),
suggestedGroupMethod = GroupMethod.CATEGORIES
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class LoginScreenModel @Inject constructor(
?: loginInfo.baseUri?.host
?: ""
updateAccountNameAndEmails(initialAccountName, emails)
updateGroupMethod(loginInfo.suggestedGroupMethod)
page = Page.AccountDetails
}

Expand Down

0 comments on commit aafcb2e

Please sign in to comment.