File searcher: fix FileManager invocation (#8257)

Do not start a new instance if not needed.
pull/8261/head
hius07 3 years ago committed by GitHub
parent e3cf8eea56
commit 8a750d4692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -214,10 +214,12 @@ function FileSearcher:onMenuHold(item)
callback = function() callback = function()
UIManager:close(self.results_dialog) UIManager:close(self.results_dialog)
self.close_callback() self.close_callback()
if is_file then local focused_path = is_file and item.dir or fullpath
FileManager:showFiles(item.dir, fullpath) local focused_file = is_file and fullpath or nil
if FileManager.instance then
FileManager.instance:reinit(focused_path, focused_file)
else else
FileManager:showFiles(fullpath) FileManager:showFiles(focused_path, focused_file)
end end
end, end,
}, },

Loading…
Cancel
Save