mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[settings-sync] IJ-CR-19463: Simplify, use find{} vs forEach{}
GitOrigin-RevId: c98c208698fcf6068ea97278221deb3d3c1b63f9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9c020e15ff
commit
481c06e8e0
@@ -112,14 +112,14 @@ internal class SettingsSyncIdeUpdater(application: Application,
|
||||
|
||||
private fun updateSyncSettings(snapshot: SettingsSnapshot) {
|
||||
val settingsPath = "$OPTIONS_DIRECTORY/" + SettingsSyncSettings.FILE_SPEC
|
||||
snapshot.fileStates.forEach {
|
||||
if (it.file == settingsPath) {
|
||||
snapshot.fileStates.find { it.file == settingsPath }
|
||||
?.let {
|
||||
rootConfig.resolve(it.file).write(it.content, 0, it.size)
|
||||
invokeAndWaitIfNeeded {
|
||||
componentStore.reloadState(SettingsSyncSettings.getInstance().javaClass)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user