Merge pull request #1489 from chrox/ota_info

Show OTA channel info when package is unavailable
pull/1490/head
HW 9 years ago
commit f8f0d1b1c7

@ -82,7 +82,7 @@ end
function NetworkMgr:getWifiStatus()
local socket = require("socket")
return socket.dns.toip("www.google.com") ~= nil
return socket.dns.toip("www.example.com") ~= nil
end
function NetworkMgr:setHTTPProxy(proxy)

@ -121,8 +121,9 @@ function OTAManager:fetchAndProcessUpdate()
text = _("Your KOReader is up to date."),
})
elseif ota_version == nil then
local channel = ota_channels[OTAManager:getOTAChannel()]
UIManager:show(InfoMessage:new{
text = _("OTA package is not available."),
text = T(_("OTA package is not available on %1 channel."), channel),
})
elseif ota_version then
UIManager:show(ConfirmBox:new{
@ -212,7 +213,7 @@ function OTAManager:getOTAMenuTable()
if NetworkMgr:getWifiStatus() == false then
NetworkMgr:promptWifiOn()
else
OTAManager.fetchAndProcessUpdate()
OTAManager:fetchAndProcessUpdate()
end
end
},

@ -22,6 +22,13 @@ case "${kmodel}" in
EIPS_X_RES=16
EIPS_Y_RES=24 # Manually mesured, should be accurate.
;;
"13" | "54" | "2A" | "4F" | "52" | "53" )
# Kindle Voyage
SCREEN_X_RES=1072
SCREEN_Y_RES=1448
EIPS_X_RES=16
EIPS_Y_RES=24 # Manually mesured, should be accurate.
;;
* )
# Handle legacy devices...
if [ -f "/etc/rc.d/functions" ] && grep "EIPS" "/etc/rc.d/functions" > /dev/null 2>&1 ; then

Loading…
Cancel
Save