From fe8fe7c7139ea12e0c5623e05644fe925c25e15c Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Wed, 26 Oct 2022 11:36:39 +0600 Subject: [PATCH 1/2] 776-Force_sync_after_login issue: https://gitlab.e.foundation/e/os/backlog/-/issues/776 To add addressbook after immidiate login, we want to call force sync after login --- .../bitfire/davdroid/ui/setup/AccountDetailsFragment.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt b/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt index 849a56953..5ab8f97ab 100644 --- a/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt +++ b/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt @@ -25,11 +25,7 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.lifecycle.* -import at.bitfire.davdroid.Constants -import at.bitfire.davdroid.DavService -import at.bitfire.davdroid.InvalidAccountException -import at.bitfire.davdroid.MailAccountSyncHelper -import at.bitfire.davdroid.R +import at.bitfire.davdroid.* import at.bitfire.davdroid.databinding.LoginAccountDetailsBinding import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.Credentials @@ -352,6 +348,9 @@ class AccountDetailsFragment : Fragment() { result.postValue(false) return@launch } + + DavUtils.requestSync(activity, account) + result.postValue(true) } return result -- GitLab From b682d827aa33380c191daaf4bd9e45aca2b57ab8 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Wed, 26 Oct 2022 19:33:03 +0600 Subject: [PATCH 2/2] remove wildcard import statement from AccountDetailsFragment --- .../at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt b/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt index 5ab8f97ab..2ccf8f682 100644 --- a/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt +++ b/app/src/main/java/at/bitfire/davdroid/ui/setup/AccountDetailsFragment.kt @@ -25,7 +25,12 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.lifecycle.* -import at.bitfire.davdroid.* +import at.bitfire.davdroid.Constants +import at.bitfire.davdroid.DavService +import at.bitfire.davdroid.DavUtils +import at.bitfire.davdroid.InvalidAccountException +import at.bitfire.davdroid.MailAccountSyncHelper +import at.bitfire.davdroid.R import at.bitfire.davdroid.databinding.LoginAccountDetailsBinding import at.bitfire.davdroid.db.AppDatabase import at.bitfire.davdroid.db.Credentials -- GitLab