Ask for connection in GoodReads plugin while offline

pull/2594/head
robert00s 7 years ago committed by Qingping Hou
parent 098ceeb95b
commit a2f2ac07a5

@ -6,6 +6,7 @@ local InfoMessage = require("ui/widget/infomessage")
local UIManager = require("ui/uimanager")
local Screen = require("device").screen
local _ = require("gettext")
local NetworkMgr = require("ui/network/manager")
local Goodreads = InputContainer:new {
goodreads_key = "",
@ -164,6 +165,10 @@ function Goodreads:search(search_type)
local text_input
local info
local result
if not NetworkMgr:isOnline() then
NetworkMgr:promptWifiOn()
return
end
if search_type == "all" then
title_header = _("Search all books in Goodreads")
hint = _("Title, author or ISBN")

Loading…
Cancel
Save