Commit 049836ec authored by Tony Crisci's avatar Tony Crisci Committed by Alexander Mikhaylenko

collection-box: Update filtering text on view change

When the active view of the CollectionBox changes, update the filtering
text on the view to the current value of the search text box so it will
filter entries correctly when it is shown.

Fixes #124


(cherry picked from commit f23208bd)
parent 7de2119b
Pipeline #34045 passed with stages
in 28 minutes and 51 seconds
......@@ -143,12 +143,15 @@ private class Games.CollectionBox : Gtk.Box {
[GtkCallback]
private void on_visible_child_changed () {
if (viewstack.visible_child == platform_view) {
platform_view.filtering_text = search_bar.text;
platform_view.select_default_row ();
}
else if (viewstack.visible_child == developer_view) {
developer_view.filtering_text = search_bar.text;
developer_view.select_default_row ();
}
else {
collection_view.filtering_text = search_bar.text;
collection_view.reset_scroll_position ();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment