From 146256714b804dfa039a9ee8489ba4bc91c7806d Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Sun, 22 Nov 2026 18:59:47 +0100 Subject: [PATCH] app: keep the clip name out of the delete dialog A long recording id pushed the wording past the panel's edge. The dialog now says the deletion plainly and leaves the naming to the card the dialog was opened from. --- app/src/screens/clips.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/app/src/screens/clips.rs b/app/src/screens/clips.rs index 72f08e5..6df79b9 100644 --- a/app/src/screens/clips.rs +++ b/app/src/screens/clips.rs @@ -301,13 +301,10 @@ pub fn delete_dialog(app: &App, p: Paint, layer: &mut Vec) { .color(p.t.text), ) .child( - text(format!( - "\"{}.mp4\" is deleted from disk. The recording stays.", - delete_name(app) - )) - .key("delete-note") - .font(body(12.0)) - .color(p.muted()), + text("This will delete the file from disk. The recording stays.") + .key("delete-note") + .font(body(12.0)) + .color(p.muted()), ) .child( row() @@ -365,12 +362,3 @@ fn delete_confirmed(app: &mut App) { } } } - -/// The clip the delete dialog is about, for the dialog's wording. -fn delete_name(app: &App) -> String { - app.confirm_clip_delete - .as_ref() - .and_then(|name| app.clips.iter().find(|clip| &clip.name == name)) - .map(|clip| clip.name.clone()) - .unwrap_or_default() -}