diff --git a/app/src/main/java/org/dhis2/usescases/login/SyncIsPerformedInteractor.kt b/app/src/main/java/org/dhis2/usescases/login/SyncIsPerformedInteractor.kt index 0105c0e4b5..0b6cf42286 100644 --- a/app/src/main/java/org/dhis2/usescases/login/SyncIsPerformedInteractor.kt +++ b/app/src/main/java/org/dhis2/usescases/login/SyncIsPerformedInteractor.kt @@ -15,8 +15,10 @@ class SyncIsPerformedInteractor(private val userManager: UserManager?) { val username = userManager.d2.userModule().user().blockingGet()?.username() val dataBaseIsImport = userManager.d2.userModule().accountManager() - .getAccounts().firstOrNull { it.serverUrl() == serverUrl && it.username() == username } - ?.importDB() != null + .getAccounts() + .any { + it.serverUrl() == serverUrl && it.username() == username && it.importDB() != null + } return when { dataBaseIsImport -> true diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 18d2547402..9d25b41ef1 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -17,41 +17,6 @@ android:layout_height="match_parent" android:background="?colorPrimary"> - -