[UX] Gesture manager: add a little notification to the wifi on action (#4786)

Fixes #4783.

Perhaps this should be in NetworkManager instead.
pull/4793/head
Frans de Jonge 5 years ago committed by GitHub
parent fdf92e13ea
commit 930731d67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -723,6 +723,11 @@ function ReaderGesture:gestureAction(action, ges)
local NetworkMgr = require("ui/network/manager")
if not NetworkMgr:isOnline() then
UIManager:show(InfoMessage:new{
text = _("Enabling wifi…"),
timeout = 1,
})
-- NB Normal widgets should use NetworkMgr:promptWifiOn()
-- This is specifically the toggle wifi action, so consent is implied.
NetworkMgr:turnOnWifi()
@ -747,6 +752,11 @@ function ReaderGesture:gestureAction(action, ges)
local NetworkMgr = require("ui/network/manager")
if not NetworkMgr:isOnline() then
UIManager:show(InfoMessage:new{
text = _("Enabling wifi…"),
timeout = 1,
})
-- NB Normal widgets should use NetworkMgr:promptWifiOn()
-- This is specifically the toggle wifi action, so consent is implied.
NetworkMgr:turnOnWifi()

Loading…
Cancel
Save