Commit f23208bd authored by Tony Crisci's avatar Tony Crisci

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
parent 01e3ec8d
Pipeline #34044 passed with stages
in 38 minutes and 28 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