Remove changed files/dirs from TreeView cache

This commit is contained in:
Guldoman
2021-11-24 06:16:54 +01:00
parent 5dca37b11a
commit 59f64088e1
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -1157,7 +1157,7 @@ end
-- no-op but can be overrided by plugins
function core.on_dirmonitor_modify()
function core.on_dirmonitor_modify(dir, filepath)
end
+8
View File
@@ -42,6 +42,14 @@ function TreeView:new()
self.target_size = default_treeview_size
self.cache = {}
self.tooltip = { x = 0, y = 0, begin = 0, alpha = 0 }
local on_dirmonitor_modify = core.on_dirmonitor_modify
function core.on_dirmonitor_modify(dir, filepath)
if self.cache[dir.name] then
self.cache[dir.name][filepath] = nil
end
on_dirmonitor_modify(dir, filepath)
end
end