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

Commit c3186fa2 authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Make sure we have contacts permission before trying to sync

parent 3b50aff5
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -113,10 +113,12 @@ class MainViewModel @Inject constructor(
        }

        // Sync contacts when we detect a change
        if (permissionManager.hasContacts()) {
            disposables += contactAddedListener.listen()
                    .debounce(1, TimeUnit.SECONDS)
                    .subscribeOn(Schedulers.io())
                    .subscribe { syncContacts.execute(Unit) }
        }

        ratingManager.addSession()
        markAllSeen.execute(Unit)