fix: focus button for permanently delete dialog

This commit is contained in:
Ashley Wulber 2025-10-17 14:14:59 -04:00 committed by Ashley Wulber
parent 2aa7b6f063
commit 6615e0a2b7
2 changed files with 68 additions and 41 deletions

View file

@ -53,13 +53,16 @@ async fn handle_replace(
let _ = msg_tx
.lock()
.await
.send(Message::DialogPush(DialogPage::Replace {
from: item_from,
to: item_to,
multiple,
apply_to_all: false,
tx,
}))
.send(Message::DialogPush(
DialogPage::Replace {
from: item_from,
to: item_to,
multiple,
apply_to_all: false,
tx,
},
None, // TODO which widget to focus?
))
.await;
rx.recv().await.unwrap_or(ReplaceResult::Cancel)
}
@ -1198,7 +1201,7 @@ mod tests {
let handle_messages = async move {
while let Some(msg) = rx.next().await {
match msg {
Message::DialogPush(DialogPage::Replace { tx, .. }) => {
Message::DialogPush(DialogPage::Replace { tx, .. }, _id_to_focus) => {
debug!("[{id}] Replace request");
tx.send(ReplaceResult::Cancel)
.await