mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[settings-sync] IJPL-13940 Ensure Settings Sync error gets propagated to the top-right gear menu
GitOrigin-RevId: 788fddd63fa40950f53257bd77b422168b6707ff
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b2416f0df1
commit
36505ee590
@@ -377,7 +377,7 @@ class SettingsSyncBridge(
|
||||
}
|
||||
|
||||
private fun checkServer() {
|
||||
when (remoteCommunicator.checkServerState()) {
|
||||
when (val result = remoteCommunicator.checkServerState()) {
|
||||
is ServerState.UpdateNeeded -> {
|
||||
LOG.info("Updating from server")
|
||||
updateChecker.scheduleUpdateFromServer()
|
||||
@@ -389,9 +389,14 @@ class SettingsSyncBridge(
|
||||
}
|
||||
ServerState.UpToDate -> {
|
||||
LOG.debug("Updating settings is not needed")
|
||||
// Clear the error state, if any
|
||||
SettingsSyncStatusTracker.getInstance().updateOnSuccess()
|
||||
}
|
||||
is ServerState.Error -> {
|
||||
// error already logged in checkServerState
|
||||
// The error is already logged in `SettingsSyncRemoteCommunicator.checkServerState`, but we need to set
|
||||
// an error state for the UI to display failed sync information in the top-right corner settings menu
|
||||
SettingsSyncStatusTracker.getInstance().updateOnError(
|
||||
SettingsSyncBundle.message("notification.title.push.error") + ": " + result.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user