Skip to content

Commit

Permalink
Show ongoing operations
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Dec 29, 2023
1 parent b33d12c commit 9edb0c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 2 additions & 9 deletions src/Views/AppListUpdateView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
5 changes: 2 additions & 3 deletions src/Widgets/AppContainers/AbstractAppContainer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
}
}
}

0 comments on commit 9edb0c3

Please sign in to comment.