KOSync: Only nag about "Action when Wi-Fi is off" when toggling (#10785)

auto-sync *on*

Fix #10784
reviewable/pr10788/r1
NiLuJe 9 months ago committed by GitHub
parent ccd29d36c0
commit 38aa74ec7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -229,7 +229,7 @@ function KOSync:addToMainMenu(menu_items)
help_text = _([[This may lead to nagging about toggling WiFi on document close and suspend/resume, depending on the device's connectivity.]]),
callback = function()
-- Actively recommend switching the before wifi action to "turn_on" instead of prompt, as prompt will just not be practical (or even plain usable) here.
if Device:hasWifiToggle() and G_reader_settings:readSetting("wifi_enable_action") ~= "turn_on" then
if Device:hasWifiToggle() and G_reader_settings:readSetting("wifi_enable_action") ~= "turn_on" and not self.settings.auto_sync then
UIManager:show(InfoMessage:new{ text = _("You will have to switch the 'Action when Wi-Fi is off' Network setting to 'turn on' to be able to enable this feature!") })
return
end

Loading…
Cancel
Save