IRC: edit server settings as a draft, applied under the service lock

The IRC App edited the live config while the IRC task could be reading
it to connect. The App now edits a copy; applyConfig() validates it and
swaps it in under the lock, and the task connects from a snapshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-03 18:42:24 +02:00
co-authored by Claude Opus 5.5
parent 4cd6a63498
commit dd16352509
6 changed files with 69 additions and 25 deletions
+2
View File
@@ -1,5 +1,6 @@
#pragma once
#include <memory>
#include <string>
#include "app.h"
@@ -50,6 +51,7 @@ class IrcApp : public App {
ListModel fields_{theme::kContent.h / theme::kLineHeight};
bool editing_ = false;
LineEditor fieldEditor_{63};
std::unique_ptr<IrcConfig> draft_; // the settings being edited, applied on Save
};
} // namespace roro