Files
clash-verge-rev/src/components/setting/mods
Tunglies b0d0b9a944 fix(profile): correct batch state updates in editors and stale reads in settings dialogs (#8695)
* fix(setting): keep the copy-success snackbar visible for its full duration

The clipboard handler cleared the success flag with a zero-delay
timeout, so the snackbar configured for 2000 ms was hidden on the next
macrotask. The clear now runs after 2000 ms, resetting the timer on
each copy so a second copy within the window keeps its full duration.

* fix(profile): update editor sequences through functional state

The rule, group and proxy editors mixed functional updaters with writes
computed from render-captured arrays, so two clicks in one React batch
(the second before re-render) read a pre-batch array: deletes dropped
an entry queued by the sibling updater, reorders resolved indices
against a stale list, and add buttons could duplicate past their
uniqueness checks. Every sequence mutation now derives from the live
previous state; the group add buttons keep their translated duplicate
notice and recheck inside the updater.

* fix(sysproxy): read the live verge config in the toggle drain loop

The drain loop captured the render-time verge snapshot, so a config
revalidation landing mid-loop left later iterations deciding connection
closing and rollback with stale values. The confirmed-state seed and
the in-loop auto-close check now read through a latest ref.

* perf(setting): defer layout dialog icon loading to first open

Both settings sections mount the layout dialog, so its eager mount
effect issued about eleven Tauri calls twice per settings-page visit
before the dialog was ever opened. The icon scan now runs once, on the
first open.

* fix(setting): clear the copy toast state when the dialog closes

Closing and reopening the controller dialog inside the two-second
window replayed the previous session's toast for the residual time;
every close path now clears the timer and the flag.
2026-11-23 04:49:13 +00:00
..
2026-08-19 07:27:43 +08:00
2026-03-15 07:40:11 +00:00