Skip to content

Commit

Permalink
Fix alert view not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Jun 20, 2024
1 parent 031edd2 commit 15e2df3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Views/SearchView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class AppCenter.SearchView : Adw.NavigationPage {
public bool mimetype { get; set; default = false; }

private AppCenterCore.SearchEngine search_engine;
private GLib.ListModel list_store;
private Gtk.SearchEntry search_entry;
private Gtk.Stack stack;
private Granite.Placeholder alert_view;

public SearchView (string search_term) {
Expand Down Expand Up @@ -62,8 +62,6 @@ public class AppCenter.SearchView : Adw.NavigationPage {
};
headerbar.pack_start (new BackButton ());

list_store = new GLib.ListStore (typeof (AppCenterCore.Package));

search_engine = AppCenterCore.FlatpakBackend.get_default ().get_search_engine ();

var selection_model = new Gtk.NoSelection (search_engine.results);
Expand All @@ -89,7 +87,7 @@ public class AppCenter.SearchView : Adw.NavigationPage {
hscrollbar_policy = Gtk.PolicyType.NEVER
};

var stack = new Gtk.Stack ();
stack = new Gtk.Stack ();
stack.add_child (alert_view);
stack.add_child (scrolled);

Expand Down Expand Up @@ -151,6 +149,7 @@ public class AppCenter.SearchView : Adw.NavigationPage {

} else {
alert_view.description = _("The search term must be at least 3 characters long.");
stack.visible_child = alert_view;
}

if (mimetype) {
Expand Down

0 comments on commit 15e2df3

Please sign in to comment.