chore: remove dead arm in DeviceState match
This commit is contained in:
parent
6fd8309cf7
commit
74e2908987
1 changed files with 5 additions and 8 deletions
|
|
@ -1862,18 +1862,15 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
.spacing(8),
|
.spacing(8),
|
||||||
);
|
);
|
||||||
btn = match known.state {
|
btn = match known.state {
|
||||||
|
// Activated entries are skipped above (shown in the active
|
||||||
|
// connections section instead), so no Disconnect arm is needed here.
|
||||||
DeviceState::Failed
|
DeviceState::Failed
|
||||||
| DeviceState::Unknown
|
| DeviceState::Unknown
|
||||||
| DeviceState::Unmanaged
|
| DeviceState::Unmanaged
|
||||||
| DeviceState::Disconnected
|
| DeviceState::Disconnected
|
||||||
| DeviceState::NeedAuth => btn.on_press(Message::Connect(
|
| DeviceState::NeedAuth => {
|
||||||
known.ssid.clone(),
|
btn.on_press(Message::Connect(known.ssid.clone(), known.hw_address))
|
||||||
known.hw_address.clone(),
|
}
|
||||||
)),
|
|
||||||
DeviceState::Activated => btn.on_press(Message::Disconnect(
|
|
||||||
known.ssid.clone(),
|
|
||||||
known.hw_address.clone(),
|
|
||||||
)),
|
|
||||||
_ => btn,
|
_ => btn,
|
||||||
};
|
};
|
||||||
known_wifi.push(Element::from(
|
known_wifi.push(Element::from(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue