mirror of
https://github.com/koreader/koreader.git
synced 2026-12-06 03:57:56 +00:00
Make only Back (not Home) return from Search Results.
It is best to restrict Home to only exit from the application (or perhaps also for closing the document, though even this is doubtful) and not use it in any other context, because otherwise pressing Home too many times may inadvertently exit the application and annoy the user. It is a bad practice to let user try various keys in different contexts and hope that one of them may work.
This commit is contained in:
1 parent
f3306d5512
commit
d1d955f3a4
1 file changed
+2
-6
+2
-6
@@ -76,11 +76,7 @@ function FileSearcher:setSearchResult(keywords)
|
||||
end
|
||||
|
||||
function FileSearcher:init(search_path)
|
||||
if search_path then
|
||||
self:setPath(search_path)
|
||||
else
|
||||
self:setPath("/mnt/us/documents")
|
||||
end
|
||||
self:setPath(search_path or "/mnt/us/documents")
|
||||
self:addAllCommands()
|
||||
end
|
||||
|
||||
@@ -245,7 +241,7 @@ function FileSearcher:addAllCommands()
|
||||
self.pagedirty = true
|
||||
end
|
||||
)
|
||||
self.commands:add({KEY_BACK, KEY_HOME}, nil, "Back",
|
||||
self.commands:add(KEY_BACK, nil, "Back",
|
||||
"back",
|
||||
function(self)
|
||||
return "break"
|
||||
|
||||
Reference in new issue
Block a user