Skip to content

Commit cc0c359

Browse files
committed
fix: adjust embedLockDebounceTime mapping for improved accuracy
- Updated the calculation for embedLockDebounceTime in SettingsDialog to round the mapped value to the nearest multiple of 50, enhancing precision in user settings adjustments.
1 parent c8678bc commit cc0c359

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/frontend/src/ui/SettingsDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ const SettingsDialog: React.FC<SettingsDialogProps> = ({
7979
value={Math.round(((settings.embedLockDebounceTime || 350) - 150) / 4850 * 100)}
8080
onChange={(value) => updateSetting(
8181
'embedLockDebounceTime',
82-
// Map 0-100 range to 150-5000ms
83-
Math.round(150 + (value / 100) * 4850)
82+
// Map 0-100 range to 150-5000ms, rounded to nearest multiple of 50
83+
Math.round((150 + (value / 100) * 4850) / 50) * 50
8484
)}
8585
min={0}
8686
max={100}

0 commit comments

Comments
 (0)