[settings-sync] Disable sync if file is not found on the server

GitOrigin-RevId: 68352486e6c6f867f3d420dee18f0afec5025b3d
This commit is contained in:
Rustam Vishnyakov
2022-09-09 18:35:40 +02:00
committed by intellij-monorepo-bot
parent 944494c4a0
commit 7c3bbbbd0e

View File

@@ -56,8 +56,8 @@ class SettingsSyncMain : Disposable {
// the push will happen automatically after updating and merging (if there is anything to merge)
}
ServerState.FileNotExists -> {
LOG.info("No file on server, we must push")
SettingsSyncEvents.getInstance().fireSettingsChanged(SyncSettingsEvent.MustPushRequest)
LOG.info("No file on server, disable settings sync")
SettingsSyncSettings.getInstance().syncEnabled = false
}
ServerState.UpToDate -> {
LOG.info("Updating settings is not needed, will check if push is needed")