mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: revise revision if the new file list is empty but the previous one was not (#2003)
This commit is contained in:
parent
fbf9b3d1ed
commit
11cf555b47
1 changed files with 4 additions and 2 deletions
|
|
@ -103,10 +103,12 @@ impl Files {
|
|||
pub fn update_full(&mut self, files: Vec<File>) {
|
||||
self.ticket = FILES_TICKET.next();
|
||||
|
||||
(self.hidden, self.items) = self.split_files(files);
|
||||
if !self.items.is_empty() {
|
||||
let (hidden, items) = self.split_files(files);
|
||||
if !(items.is_empty() && self.items.is_empty()) {
|
||||
self.revision += 1;
|
||||
}
|
||||
|
||||
(self.hidden, self.items) = (hidden, items);
|
||||
}
|
||||
|
||||
pub fn update_part(&mut self, files: Vec<File>, ticket: Id) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue