NetworkListener: guard against auto_disable_wifi enabled by user on unsupported devices (#15655)

Closes #15397.

Also see #15183.
This commit is contained in:
Frans de Jonge authored and GitHub committed 2026-07-08 19:05:20 +02:00
1 parent 14fcf302eb
commit be7fc98452
1 file changed
+2 -1
+2 -1
View File
@@ -181,7 +181,8 @@ function NetworkListener:onNetworkConnected()
NetworkMgr:setWifiState(true)
NetworkMgr:setConnectionState(true)
if not G_reader_settings:isTrue("auto_disable_wifi") then
-- You can't set auto_disable_wifi on devices without getNetworkInterfaceName() but guard against it in case it was accidentally set anyway.
if not self:getNetworkInterfaceName() or not G_reader_settings:isTrue("auto_disable_wifi") then
return
end