restrict-applications-selector: Fix pending changes being lost on search
The app filter set on the MctRestrictApplicationsSelector
is
immutable, so pending changes to the set of blocked applications are
stored in self->blocklisted_apps
until the dialog is closed and a new
app filter is built from its data.
This was fine before search was added, as the set of app rows in the
selector were only built once. With search, however, rows are
dynamically destroyed and re-created (create_row_for_app_cb()
) as the
search terms are changed. The block state for each app is reloaded as
its row is recreated, in update_listbox_row_switch()
. However, this
only paid attention to the original app filter, and not the set of
changes since (self->blocklisted_apps
). So the changes to rows which
weren’t in search results would be lost.
Fix that by making update_listbox_row_switch()
also read
self->blocklisted_apps
.
Signed-off-by: Philip Withnall pwithnall@gnome.org