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

Commit 9e4308e0 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

refactor: prevent syncing /e/ account on murena.io if account is logged with password

parent 652877fe
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -40,12 +40,12 @@ class BootCompletedReceiver: BroadcastReceiver() {
        // sync intervals are checked in App.onCreate()
        AccountUtils.getMainAccounts(context)
            .forEach {
                val accountSettings = AccountSettings(context, it)
                accountSettings.initSync()

                if (eAccountType == it.type && !isLoggedWithOpenId(it, accountManager)) {
                    Logger.log.info("Vincent: eAccountFound. Will notify")
                    notifySwitchToOpenId(it, context)
                } else {
                    val accountSettings = AccountSettings(context, it)
                    accountSettings.initSync()
                }
            }
    }