@ -211,14 +211,21 @@ function OTAManager:fetchAndProcessUpdate()
text=T(_("Update information not available on %1 channel."),channel),
text=T(_("Update information not available on %1 channel."),channel),
})
})
elseifota_versionthen
elseifota_versionthen
localupdate_message=T(_("Do you want to update?\nInstalled version: %1\nAvailable version: %2"),
local_version,
ota_version)
localupdate_ok_text=_("Update")
ifota_version<local_versionthen
update_message=T(_("The currently installed version is newer than the available version.\nWould you still like to continue and downgrade?\nInstalled version: %1\nAvailable version: %2"),
local_version,
ota_version)
update_ok_text=_("Downgrade")
end
ifOTAManager:getOTAType()=="link"then
ifOTAManager:getOTAType()=="link"then
UIManager:show(ConfirmBox:new{
UIManager:show(ConfirmBox:new{
text=T(
text=update_message,
_("Do you want to update?\nInstalled version: %1\nAvailable version: %2"),
ok_text=update_ok_text,
local_version,
ota_version
),
ok_text=_("Update"),
ok_callback=function()
ok_callback=function()
localisAndroid,android=pcall(require,"android")
localisAndroid,android=pcall(require,"android")
ifisAndroidthen
ifisAndroidthen
@ -235,12 +242,8 @@ function OTAManager:fetchAndProcessUpdate()
})
})
else
else
UIManager:show(ConfirmBox:new{
UIManager:show(ConfirmBox:new{
text=T(
text=update_message,
_("Do you want to update?\nInstalled version: %1\nAvailable version: %2"),