mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
fix: Add @MainActor annotation to debounce Task in NodeList onChange handler
Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/ec4c8629-8d84-4450-9df2-2818b06f9296 Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
This commit is contained in:
parent
36c07ba685
commit
8a7f67e8ac
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ struct NodeList: View {
|
|||
.onChange(of: router.nodeListSelectedNodeNum) { _, newNum in
|
||||
// Debounce rapid route changes — only process the last selection after a short delay
|
||||
nodeSelectionTask?.cancel()
|
||||
nodeSelectionTask = Task {
|
||||
nodeSelectionTask = Task { @MainActor in
|
||||
do {
|
||||
try await Task.sleep(nanoseconds: Self.nodeSelectionDebounceNs)
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue