diff --git a/src/Views/AppListUpdateView.vala b/src/Views/AppListUpdateView.vala index 2aa618c7b..d53ab3eef 100644 --- a/src/Views/AppListUpdateView.vala +++ b/src/Views/AppListUpdateView.vala @@ -436,15 +436,8 @@ namespace AppCenter.Views { updating_all_apps = false; } - public async void add_app (AppCenterCore.Package package) { - unowned AppCenterCore.Client client = AppCenterCore.Client.get_default (); - var installed_apps = yield client.get_installed_applications (); - foreach (var app in installed_apps) { - if (app == package) { - updates_liststore.insert_sorted (package, compare_package_func); - break; - } - } + public void add_app (AppCenterCore.Package package) { + updates_liststore.insert_sorted (package, compare_package_func); } public void clear () { diff --git a/src/Widgets/AppContainers/AbstractAppContainer.vala b/src/Widgets/AppContainers/AbstractAppContainer.vala index 6dd833e7f..17532ac38 100644 --- a/src/Widgets/AppContainers/AbstractAppContainer.vala +++ b/src/Widgets/AppContainers/AbstractAppContainer.vala @@ -278,9 +278,8 @@ public abstract class AppCenter.AbstractAppContainer : Gtk.Box { } } } else { - if (yield package.install ()) { - MainWindow.installed_view.add_app.begin (package); - } + MainWindow.installed_view.add_app (package); + yield package.install (); } } }