Skip to content

Don't refresh updates when closing Preferences without changes - #1105

Closed
rafaumeu wants to merge 1 commit into
linuxmint:masterfrom
rafaumeu:fix/preferences-noop-refresh
Closed

rafaumeu wants to merge 1 commit into
linuxmint:masterfrom
rafaumeu:fix/preferences-noop-refresh

Conversation

@rafaumeu

Copy link
Copy Markdown

Description

Closing the Preferences window always refreshed the updates list, even when nothing was modified. This discards the current selection and rebuilds the tree for no reason.

This PR only refreshes when the blacklisted packages were actually modified in the Blacklist tab. The restart-on-close path (when a preference requires it) keeps precedence and is unchanged.

Fixes #603

Notes

  • _save_blacklist() now compares the treeview contents against the current gsettings value and only writes (and flags the change) when they differ.
  • _on_preferences_destroyed() refreshes only when the blacklist actually changed.

Partially assisted by an AI coding agent; the fix was reviewed and validated by the author (characterization harness: no-op close performs zero gsettings writes and no refresh; add/remove still refresh).

…mint#603)

Closing the Preferences window always refreshed the updates list, even
when nothing was modified, discarding the current selection and
rebuilding the tree for no reason. Only refresh when the blacklisted
packages actually changed.
@mtwebster

Copy link
Copy Markdown
Member

Blacklist changes are not the only thing that can affect updates. I'd prefer this be overly broad than explicitly narrow.

@mtwebster mtwebster closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't refresh mintupdate if the Preferences weren't changed

2 participants