[Gesture] Add progress sync gesture (#6103)

This commit is contained in:
Robert
2020-05-05 18:51:02 +02:00
committed by GitHub
parent c2a0cc836d
commit 3f874f0d1f
2 changed files with 19 additions and 0 deletions

View File

@@ -106,6 +106,8 @@ local action_strings = {
cycle_highlight_action = _("Cycle highlight action"),
cycle_highlight_style = _("Cycle highlight style"),
wallabag_download = _("Wallabag retrieval"),
kosync_push_progress = _("Push progress from this device"),
kosync_pull_progress = _("Pull progress from other devices"),
}
local custom_multiswipes_path = DataStorage:getSettingsDir().."/multiswipes.lua"
@@ -787,6 +789,9 @@ function ReaderGesture:buildMenu(ges, default)
{"cycle_highlight_action", not self.is_docless},
{"cycle_highlight_style", not self.is_docless},
{"wallabag_download", self.ui.wallabag ~= nil},
{"kosync_push_progress", not self.is_docless},
{"kosync_pull_progress", not self.is_docless},
}
local return_menu = {}
-- add default action to the top of the submenu
@@ -1571,6 +1576,10 @@ function ReaderGesture:gestureAction(action, ges)
self.ui:handleEvent(Event:new("CycleHighlightAction"))
elseif action == "cycle_highlight_style" then
self.ui:handleEvent(Event:new("CycleHighlightStyle"))
elseif action == "kosync_push_progress" then
self.ui:handleEvent(Event:new("KOSyncPushProgress"))
elseif action == "kosync_pull_progress" then
self.ui:handleEvent(Event:new("KOSyncPullProgress"))
end
return true
end