Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network applet: fixes to # of visible networks #12417

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 27, 2024

  1. network applet: fix accounting of menu indexes

    In _createSection() and _createNetworkItem(), previously we would skip
    the menu index in which the active network is present.  If this index
    was < NUM_VISIBLE_NETWORKS, then we could display too few networks
    before we begin stashing them in the "more" menu.
    
    _accessPointAdded() is also refactored to more closely resemble the
    above two, but this is a nonbehavioral change.
    jknockel committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    2d89551 View commit details
    Browse the repository at this point in the history
  2. network applet: keep visible networks under limit

    When adding a network, if we add it to a menu index <
    NUM_VISIBLE_NETWORKS, if we now have > NUM_VISIBLE_NETWORKS networks, we
    need to push the last visible network to being the first network in the
    "more" menu.  Otherwise, we could end up with too many visible networks.
    
    When updating a network position, we first removed it from the menu.
    When doing this, if its original menu index was < NUM_VISIBLE_NETWORKS,
    then we need to bump the first network in the "more" menu to being the
    last visible network.  We now do this by now calling the already
    existing _accessPointRemoved() method which handles this case.
    Otherwise, we could end up with too few visible networks.
    jknockel committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    bc8baf8 View commit details
    Browse the repository at this point in the history