FileManager: Tweak #7564 (#7571)

Tweak the goHome handler directly, instead of only the Home button.
Also, limit it to when it's actually needed, as changeToPath already
does it.
reviewable/pr7572/r1
NiLuJe 3 years ago committed by GitHub
parent 9e9a87434b
commit 14f9f9d3fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -118,7 +118,6 @@ function FileManager:setupLayout()
padding_bottom = 0,
callback = function()
self:goHome()
self:onRefresh()
end,
hold_callback = function() self:setHome() end,
}
@ -785,6 +784,8 @@ function FileManager:goHome()
-- Jump to the first page if we're already home
if self.file_chooser.path and home_dir == self.file_chooser.path then
self.file_chooser:onGotoPage(1)
-- Also pick up new content, if any.
self.file_chooser:refreshPath()
else
self.file_chooser:changeToPath(home_dir)
end

Loading…
Cancel
Save