Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Sync engines in case of a explicit sync #2226

Merged
merged 1 commit into from
Nov 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ private void updateProfile(Profile profile) {
}

private void sync(View view) {
mAccounts.syncNowAsync(SyncReason.User.INSTANCE, false);
if (mBinding.bookmarksSyncSwitch.isChecked() != mInitialBookmarksState ||
mBinding.historySyncSwitch.isChecked() != mInitialHistoryState) {
mAccounts.syncNowAsync(SyncReason.EngineChange.INSTANCE, false);
} else {
mAccounts.syncNowAsync(SyncReason.User.INSTANCE, false);
}
}

private AccountObserver mAccountListener = new AccountObserver() {
Expand Down