Remove pending transfer with storage (use action)

This commit is contained in:
veeso
2021-12-13 12:32:16 +01:00
committed by Christian Visintin
parent 197b3095b6
commit e047179ea0
7 changed files with 106 additions and 148 deletions

View File

@@ -1343,7 +1343,7 @@ impl Component<Msg, NoUserEvent> for ReplacePopup {
Some(Msg::None)
}
Event::Keyboard(KeyEvent { code: Key::Esc, .. }) => {
Some(Msg::Ui(UiMsg::CloseReplacePopups))
Some(Msg::PendingAction(PendingActionMsg::CloseReplacePopups))
}
Event::Keyboard(KeyEvent {
code: Key::Enter, ..
@@ -1352,9 +1352,9 @@ impl Component<Msg, NoUserEvent> for ReplacePopup {
self.perform(Cmd::Submit),
CmdResult::Submit(State::One(StateValue::Usize(0)))
) {
Some(Msg::Transfer(TransferMsg::TransferPendingFile))
Some(Msg::PendingAction(PendingActionMsg::TransferPendingFile))
} else {
Some(Msg::Ui(UiMsg::CloseReplacePopups))
Some(Msg::PendingAction(PendingActionMsg::CloseReplacePopups))
}
}
_ => None,
@@ -1393,7 +1393,7 @@ impl Component<Msg, NoUserEvent> for ReplacingFilesListPopup {
fn on(&mut self, ev: Event<NoUserEvent>) -> Option<Msg> {
match ev {
Event::Keyboard(KeyEvent { code: Key::Esc, .. }) => {
Some(Msg::Ui(UiMsg::CloseReplacePopups))
Some(Msg::PendingAction(PendingActionMsg::CloseReplacePopups))
}
Event::Keyboard(KeyEvent { code: Key::Tab, .. }) => {
Some(Msg::Ui(UiMsg::ReplacePopupTabbed))