1
0
mirror of https://github.com/bobwen-dev/hunter synced 2025-04-12 00:55:41 +02:00

recalculate number of visible files when filter is updated

This commit is contained in:
rabite 2020-02-16 13:37:56 +01:00
parent 84d7773205
commit f10f7d5e32

View File

@ -788,6 +788,8 @@ impl Files {
// Do this first, so we know len() == 0 needs a placeholder
self.remove_placeholder();
self.recalculate_len();
if self.len() == 0 {
let placeholder = File::new_placeholder(&self.directory.path).unwrap();
self.files.push(placeholder);