Browse Source

Revert "Fix settings done button with unsaved changes"

This reverts commit e69f27d3193e816c62dc58f0e811932b4d733f9c.
System233 1 year ago
parent
commit
5a2f2eadc6

+ 0 - 5
.changeset/twenty-rice-own.md

@@ -1,5 +0,0 @@
----
-"roo-cline": patch
----
-
-Fix settings done button with unsaved changes

+ 2 - 5
webview-ui/src/components/settings/SettingsView.tsx

@@ -173,6 +173,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
 				text: currentApiConfigName,
 				apiConfiguration,
 			})
+			// onDone()
 			setChangeDetected(false)
 		}
 	}
@@ -216,11 +217,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
 
 	const onConfirmDialogResult = useCallback((confirm: boolean) => {
 		if (confirm) {
-			setChangeDetected(false)
-			// Wait for the change detection to be updated
-			setTimeout(() => {
-				confirmDialogHandler.current?.()
-			}, 100)
+			confirmDialogHandler.current?.()
 		}
 	}, [])