switch to AUR tab when no result in repos

This commit is contained in:
guinux 2017-09-25 20:21:31 +02:00
parent 8f19ea1887
commit bad4624c3b

View File

@ -1942,7 +1942,16 @@ namespace Pamac {
hide_sidebar (); hide_sidebar ();
} }
var pkgs = transaction.search_pkgs.end (res); var pkgs = transaction.search_pkgs.end (res);
if (pkgs.length == 0 && transaction.enable_aur) {
packages_list.clear ();
transaction.search_in_aur.begin (search_string, (obj, res) => {
if (transaction.search_in_aur.end (res).length > 0) {
origin_stack.visible_child_name = "aur";
}
});
} else {
populate_packages_list (pkgs); populate_packages_list (pkgs);
}
}); });
aur_list.clear (); aur_list.clear ();
break; break;