chore: focus empty trash and mount error buttons

This commit is contained in:
Ashley Wulber 2025-10-17 16:02:55 -04:00 committed by Ashley Wulber
parent e6da0a8ae5
commit ee550266c6
2 changed files with 54 additions and 31 deletions

View file

@ -36,7 +36,9 @@ use std::{
};
use crate::{
app::{Action, ContextPage, Message as AppMessage, PreviewItem, PreviewKind},
app::{
Action, ContextPage, Message as AppMessage, PreviewItem, PreviewKind, REPLACE_BUTTON_ID,
},
config::{Config, DialogConfig, Favorite, TIME_CONFIG_ID, ThumbCfg, TimeConfig, TypeToSearch},
fl, home_dir,
key_bind::key_binds,
@ -1597,6 +1599,7 @@ impl Application for App {
self.dialog_pages.push_back(DialogPage::Replace {
filename: filename.clone(),
});
return widget::button::focus(REPLACE_BUTTON_ID.clone());
} else {
self.result_opt = Some(DialogResult::Open(vec![path]));
return window::close(self.flags.window_id);