mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
NewsDownloader promptWifiOn (#3388)
This commit is contained in:
parent
5c6161da66
commit
23ab33c0b9
@ -3,6 +3,7 @@ local FFIUtil = require("ffi/util")
|
||||
local InfoMessage = require("ui/widget/infomessage")
|
||||
local LuaSettings = require("frontend/luasettings")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local NetworkMgr = require("ui/network/manager")
|
||||
local WidgetContainer = require("ui/widget/container/widgetcontainer")
|
||||
local ffi = require("ffi")
|
||||
local http = require("socket.http")
|
||||
@ -133,6 +134,10 @@ function NewsDownloader:lazyInitialization()
|
||||
end
|
||||
|
||||
function NewsDownloader:loadConfigAndProcessFeeds()
|
||||
if not NetworkMgr:isOnline() then
|
||||
NetworkMgr:promptWifiOn()
|
||||
return
|
||||
end
|
||||
local info = InfoMessage:new{ text = _("Loading news feed config…") }
|
||||
UIManager:show(info)
|
||||
logger.dbg("force repaint due to upcoming blocking calls")
|
||||
|
Loading…
Reference in New Issue
Block a user