ReaderGesture: cleanup (#6292)

convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
This commit is contained in:
yparitcher
2020-07-12 14:47:49 -04:00
committed by GitHub
parent f4dad2fae8
commit 70f89c4df1
26 changed files with 585 additions and 595 deletions

View File

@@ -105,7 +105,7 @@ function FileSearcher:close()
end
end
function FileSearcher:onShowFileSearch(search_path)
function FileSearcher:onShowFileSearch()
local dummy = self.search_value
local enabled_search_home_dir = true
if not G_reader_settings:readSetting("home_dir") then
@@ -129,7 +129,7 @@ function FileSearcher:onShowFileSearch(search_path)
text = _("Current folder"),
enabled = true,
callback = function()
self.path = search_path or lfs.currentdir()
self.path = self.ui.file_chooser and self.ui.file_chooser.path or self.ui:getLastDirFile()
self.search_value = self.search_dialog:getInputText()
if self.search_value == dummy then -- probably DELETE this if/else block
self.use_previous_search_results = true