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

Commit

Permalink
Sync engines in case of a explicit sync (#2226)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo authored and MortimerGoro committed Nov 12, 2019
1 parent b98ed52 commit e0b1ebd
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit e0b1ebd

Please sign in to comment.