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

Commit e0b1ebd

Browse files
keianhzoMortimerGoro
authored andcommitted
Sync engines in case of a explicit sync (#2226)
1 parent b98ed52 commit e0b1ebd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/FxAAccountOptionsView.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ private void updateProfile(Profile profile) {
191191
}
192192

193193
private void sync(View view) {
194-
mAccounts.syncNowAsync(SyncReason.User.INSTANCE, false);
194+
if (mBinding.bookmarksSyncSwitch.isChecked() != mInitialBookmarksState ||
195+
mBinding.historySyncSwitch.isChecked() != mInitialHistoryState) {
196+
mAccounts.syncNowAsync(SyncReason.EngineChange.INSTANCE, false);
197+
} else {
198+
mAccounts.syncNowAsync(SyncReason.User.INSTANCE, false);
199+
}
195200
}
196201

197202
private AccountObserver mAccountListener = new AccountObserver() {

0 commit comments

Comments
 (0)