intellij-community
intellij-community copied to clipboard
[settings-sync] IJPL-13205 Fix setting status label update when deleting remote data
Fixes ticket described here: [IJPL-13205] Settings Sync shows enabled if settings were disabled with remove all data option
Since the even handler runs in a different thread from the progress modal, ModalityKt.defaultModalityImpl() won't be able to get it from ProgressManager.getInstanceOrNull()?.currentProgressModality, causing the modality state to fall back to non-modal, delaying the label update until after the settings dialog is closed.
It's fixed by just storing the settings dialog modality state before showing the progress modal and passing it to runInEdt explicitly.