This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Disable update notification for disabled packages #1005
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
The purpose of this pull request is to fix the bug where a notification is given that updates are available even though the package is disabled.
This is done by looking at all the packages in the list
updates
in thepackage-updates-status-view.js
and then temporarily remove all disabled packages from the list when calculating the number of packages that have available updates.A event is also introduced which is triggered by enabling or disabling a package. The purpose of this is so that the user is immediately informed if the package has an available update or it let's Atom know that the user is not interested to know if updates are available for the selected package.
Alternate Designs
An alternative is the remove all the disabled packages from the list
updates
completely and then add them when the package is enabled. This however would lead to that the packages won't show up in theavailable-updates
view.Benefits
Now all disabled packages will not trigger the update status message that appears in the lower right corner. The status message will also be updated when enabling or disabling a package.
Possible Drawbacks
The function
updateTile
becomes a bit more complex and also have some impact on performance depending on how many packages that are in theupdates
list.Applicable Issues
Fixes #956