summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-11-12 22:54:54 +0100
committerqkzk <qu3nt1n@gmail.com>2023-11-12 22:54:54 +0100
commit69f81b09200ae322139289ca06852e01c0c89b26 (patch)
tree9f443e45459c8335463c204f3465105b6b940c60
parenteb8d0e7175a6232b6b392610abd5d54ee618c43e (diff)
BUG seek: trash
-rw-r--r--development.md1
-rw-r--r--src/event_exec.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/development.md b/development.md
index eb9542c..a29f015 100644
--- a/development.md
+++ b/development.md
@@ -631,6 +631,7 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally.
- [ ] struct for every drawable element
- [ ] Draw trait
- [x] better messages when asking a password
+- [ ] FIX: trash is buggy. Can't delete definitely. Display is wrong when empty.
## TODO
diff --git a/src/event_exec.rs b/src/event_exec.rs
index 95e95e7..55d0134 100644
--- a/src/event_exec.rs
+++ b/src/event_exec.rs
@@ -858,6 +858,7 @@ impl EventAction {
Self::toggle_flag(status)?;
}
+ status.trash.update()?;
for flagged in status.flagged.content.iter() {
status.trash.trash(flagged)?;
}
@@ -868,6 +869,7 @@ impl EventAction {
/// Ask the user if he wants to empty the trash.
/// It requires a confimation before doing anything
pub fn trash_empty(status: &mut Status) -> Result<()> {
+ status.trash.update()?;
status
.selected()
.set_mode(Mode::NeedConfirmation(NeedConfirmation::EmptyTrash));