feat: Show count of files affected when 'Replace all' is selected in copy/move operations

This commit is contained in:
Ric's Dev 2026-02-11 21:55:44 +01:00
parent 3ecdb59f3b
commit 14c96a466e
3 changed files with 29 additions and 7 deletions

View file

@ -567,6 +567,7 @@ pub enum DialogPage {
to: tab::Item,
multiple: bool,
apply_to_all: bool,
conflict_count: usize,
tx: mpsc::Sender<ReplaceResult>,
},
SetExecutableAndLaunch {
@ -5715,6 +5716,7 @@ impl Application for App {
to,
multiple,
apply_to_all,
conflict_count,
tx,
} => {
let military_time = self.config.tab.military_time;
@ -5739,13 +5741,18 @@ impl Application for App {
if *multiple {
dialog
.control(
widget::checkbox(fl!("apply-to-all"), *apply_to_all).on_toggle(
widget::checkbox(
format!("{} ({})" ,fl!("apply-to-all"), *conflict_count),
*apply_to_all,
)
.on_toggle(
|apply_to_all| {
Message::DialogUpdate(DialogPage::Replace {
from: from.clone(),
to: to.clone(),
multiple: *multiple,
apply_to_all,
conflict_count: *conflict_count,
tx: tx.clone(),
})
},