Skip to content

Commit

Permalink
network applet: Make sure there's always a menu item for the active
Browse files Browse the repository at this point in the history
connection.

setActiveConnection will return early if there's no change to the
item.

Fixes #9531.
  • Loading branch information
mtwebster committed Aug 28, 2020
1 parent 6347298 commit 42960e3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2047,15 +2047,16 @@ CinnamonNetworkApplet.prototype = {
} else
a._primaryDevice = this._devices.vpn.device;

if (a._primaryDevice)
a._primaryDevice.setActiveConnection(a);

if (a.state == NM.ActiveConnectionState.ACTIVATED &&
a._primaryDevice && a._primaryDevice._notification) {
a._primaryDevice._notification.destroy();
a._primaryDevice._notification = null;
}
}

if (a._primaryDevice) {
a._primaryDevice.setActiveConnection(a);
}
}

this._mainConnection = activated || activating || default_ip4 || default_ip6 || null;
Expand Down

0 comments on commit 42960e3

Please sign in to comment.