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

auto-sync *on*

Fix #10784
This commit is contained in:
NiLuJe
2023-08-06 00:02:39 +02:00
committed by GitHub
parent ccd29d36c0
commit 38aa74ec7c

View File

@@ -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