ui: one clipboard path, and Copy invite link in the voice header

Copying went through a hidden text field on the phone's voice screen
only. It moves into MainWindow: any screen calls Nav.copy(text), and
Bridge.copied() confirms it in one toast, shown again when its text is
the same as the last copy's. The invite leaves its own message for that
toast (the channel and the link) instead of a status of its own, so a
copy never shows two. The desktop voice channel view gets the same
Invite as a Copy invite link button next to Chat only.

Icons.channel is the speaker, for the channel spots that use it later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
Claude committed 2026-10-06 08:44:29 +00:00
1 parent 3c47bc682f
commit 61636b23c8
11 files changed
+67 -18

No files matched your search

+10
View File
@@ -430,6 +430,9 @@ pub(crate) struct App {
pub sessions: HashMap<i64, SessionView>,
pub models: Models,
pub status: String,
/// What the toast of the next copy says instead of "Copied" (an invite
/// names its channel and link).
pub copy_note: Option<String>,
/// The members panel's search.
pub member_filter: String,
/// The topics drawer's search.
@@ -679,6 +682,7 @@ pub fn run(options: RunOptions) -> Result<()> {
sessions: HashMap::new(),
models,
status: String::new(),
copy_note: None,
member_filter: String::new(),
topic_filter: String::new(),
voice_view: false,
@@ -844,6 +848,12 @@ impl App {
}
}
/// Nav.copy put text on the clipboard: one toast says so.
pub fn copied(&mut self) {
let text = self.copy_note.take().unwrap_or_else(|| "Copied".to_owned());
self.set_status(text);
}
pub fn store_settings(&self) {
if let Err(e) = self.prefs.set(&UI, self.settings.clone()) {
warn!(%e, "could not store settings");