Use replace dialog in all required places, part of #180
This commit is contained in:
parent
35fcb011c5
commit
97444c3572
4 changed files with 149 additions and 116 deletions
|
|
@ -51,7 +51,7 @@ use crate::{
|
|||
key_bind::key_binds,
|
||||
menu, mime_app,
|
||||
mounter::{mounters, MounterItem, MounterItems, MounterKey, Mounters},
|
||||
operation::Operation,
|
||||
operation::{Operation, ReplaceResult},
|
||||
spawn_detached::spawn_detached,
|
||||
tab::{self, HeadingOptions, ItemMetadata, Location, Tab},
|
||||
};
|
||||
|
|
@ -300,7 +300,7 @@ pub enum DialogPage {
|
|||
Replace {
|
||||
from: tab::Item,
|
||||
to: tab::Item,
|
||||
tx: mpsc::Sender<fs_extra::dir::TransitProcessResult>,
|
||||
tx: mpsc::Sender<ReplaceResult>,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -1207,9 +1207,7 @@ impl Application for App {
|
|||
DialogPage::Replace { tx, .. } => {
|
||||
return Command::perform(
|
||||
async move {
|
||||
let _ = tx
|
||||
.send(fs_extra::dir::TransitProcessResult::Overwrite)
|
||||
.await;
|
||||
let _ = tx.send(ReplaceResult::Replace).await;
|
||||
message::none()
|
||||
},
|
||||
|x| x,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue