fix(有线开关):初始化有线开关时,以后端状态为准,同步gsetting(#175534)

This commit is contained in:
jzxc95 2023-08-11 17:28:35 +08:00
parent af838bb79f
commit 8b5a300403
1 changed files with 1 additions and 2 deletions

View File

@ -153,8 +153,7 @@ void LanPage::initNetSwitch()
wiredGsetting = m_switchGsettings->get(WIRED_SWITCH).toBool();
connect(m_switchGsettings, &QGSettings::changed, this, &LanPage::onSwithGsettingsChanged);
if (wiredEnable != wiredGsetting) {
wiredEnable = wiredGsetting;
m_wiredConnectOperation->setWiredEnabled(wiredGsetting);
m_switchGsettings->set(WIRED_SWITCH, wiredEnable);
}
}
} else {