mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Add notification when toggling 'Ignore long-press on corners' via Dispatcher (#13605)
This commit is contained in:
@@ -1196,13 +1196,22 @@ function Gestures:multiswipeAction(multiswipe_directions, ges)
|
||||
end
|
||||
end
|
||||
|
||||
function Gestures:onIgnoreHoldCorners(ignore_hold_corners)
|
||||
function Gestures:onIgnoreHoldCorners(ignore_hold_corners, no_notification)
|
||||
if ignore_hold_corners == nil then
|
||||
G_reader_settings:flipNilOrFalse("ignore_hold_corners")
|
||||
else
|
||||
G_reader_settings:saveSetting("ignore_hold_corners", ignore_hold_corners)
|
||||
end
|
||||
self.ignore_hold_corners = G_reader_settings:isTrue("ignore_hold_corners")
|
||||
|
||||
if no_notification then return true end
|
||||
|
||||
local Notification = require("ui/widget/notification")
|
||||
if G_reader_settings:readSetting("ignore_hold_corners") then
|
||||
Notification:notify(_("Ignore long-press on corners: on"))
|
||||
else
|
||||
Notification:notify(_("Ignore long-press on corners: off"))
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user