mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
Merge branch 'fengshaoxiong/uos_Bug29792' into 'uos'
fix(network): 任务栏无线网络列表存在网络信号差的网络显示 See merge request dde-v20/dde-dock!605
This commit is contained in:
commit
5b2ef91059
@ -122,8 +122,13 @@ void WirelessList::APAdded(const QJsonObject &apInfo)
|
||||
AccessPoint ap(apInfo);
|
||||
const auto mIndex = m_apList.indexOf(ap);
|
||||
if (mIndex != -1) {
|
||||
m_apList.replace(mIndex, ap);
|
||||
if(ap.strength() < 20 && ap.path() == m_apList.at(mIndex).path())
|
||||
m_apList.removeAt(mIndex);
|
||||
else
|
||||
m_apList.replace(mIndex, ap);
|
||||
} else {
|
||||
if(ap.strength() < 20)
|
||||
return;
|
||||
m_apList.append(ap);
|
||||
}
|
||||
|
||||
@ -183,8 +188,20 @@ void WirelessList::APPropertiesChanged(const QJsonObject &apInfo)
|
||||
{
|
||||
AccessPoint ap(apInfo);
|
||||
const auto mIndex = m_apList.indexOf(ap);
|
||||
if (mIndex != -1) {
|
||||
m_apList.replace(mIndex, ap);
|
||||
if(ap.strength() < 20)
|
||||
{
|
||||
if(mIndex != -1){
|
||||
if (ap.path() == m_apList.at(mIndex).path()) {
|
||||
m_apList.removeAt(mIndex);
|
||||
m_updateAPTimer->start();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (mIndex != -1) {
|
||||
m_apList.replace(mIndex, ap);
|
||||
}else {
|
||||
m_apList.append(ap);
|
||||
}
|
||||
m_updateAPTimer->start();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user