Fix selection counter never decreasing

This commit is contained in:
0x192 2022-01-31 01:06:14 +01:00
commit 64c99db00d
No known key found for this signature in database
GPG key ID: 34D27465928A0A1D

View file

@ -55,6 +55,9 @@ pub fn fetch_packages(
pub fn update_selection_count(selection: &mut Selection, p_state: PackageState, add: bool) {
// Selection can't be negative
if !add && selection.selected_packages.is_empty() {
selection.enabled = 0;
selection.disabled = 0;
selection.uninstalled = 0;
return;
}