mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Ask for connection in GoodReads plugin while offline
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user