Skip to content

Commit

Permalink
simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Mar 28, 2024
1 parent 2d46e17 commit a40373b
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/Views/HotspotPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -203,23 +203,10 @@
var root_iface_is_hotspot = Utils.get_device_is_hotspot (root_iface.wifi_device);
if (root_iface_is_hotspot) {
state = NM.DeviceState.ACTIVATED;
status_type = SUCCESS;
} else {
state = NM.DeviceState.DISCONNECTED;
}

switch (state) {
case ACTIVATED:
status_type = SUCCESS;
break;
case DISCONNECTED:
status_type = OFFLINE;
break;
case FAILED:
status_type = ERROR;
break;
default:
status_type = WARNING;
break;
status_type = OFFLINE;
}

status = Utils.state_to_string (state);
Expand Down

0 comments on commit a40373b

Please sign in to comment.