Commit e4b2cc06 authored by Guido Gunther's avatar Guido Gunther Committed by Guido Gunther

wifimanager: Clean up device state when (de)activating a connection

Don't use the device and access point information before we're
actually associted. Otherwise we show strength information from
outdated access points.

Closes: #202Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 14ee744b
Pipeline #50473 passed with stages
in 15 minutes and 41 seconds
......@@ -219,6 +219,7 @@ on_nm_active_connection_state_changed (PhoshWifiManager *self,
switch (state) {
case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
self->icon_name = g_strdup("network-wireless-acquiring-symbolic");
cleanup_device (self);
break;
case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
self->icon_name = g_strdup("network-wireless-connected-symbolic");
......@@ -229,6 +230,7 @@ on_nm_active_connection_state_changed (PhoshWifiManager *self,
case NM_ACTIVE_CONNECTION_STATE_DEACTIVATED:
default:
self->icon_name = g_strdup("network-wireless-offline-symbolic");
cleanup_device (self);
break;
}
g_object_notify_by_pspec (G_OBJECT (self), props[PHOSH_WIFI_MANAGER_PROP_ICON_NAME]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment