[flatpak] fix: not displaying updates for partials listed as installed apps/runtimes

This commit is contained in:
Vinicius Moreira
2021-11-09 13:12:06 -03:00
parent 00fda53287
commit 6e7c871b1a
2 changed files with 11 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Flatpak
- not displaying update components not associated with installed packages
- not displaying the updates size for Flatpak 1.2
- not displaying updates for "partials" listed as installed apps/runtimes
- UI
- upgrade summary: not displaying the icon type for some applications

View File

@@ -168,9 +168,12 @@ class FlatpakManager(SoftwareManager):
for partial_update_id in update_map['partial']:
partial_data = partial_update_id.split('/')
for model_update_id, model in models.items():
if model.installation == partial_data[2] and model_update_id in partial_data[0] and \
model.branch == partial_data[1]:
for model in models.values():
if model.installation == partial_data[2] and model.branch == partial_data[1]:
if model.id == partial_data[0]:
model.update = True
break
elif model.id in partial_data[0]:
partial_model = model.gen_partial(partial_data[0])
partial_model.update = True
models[partial_update_id] = partial_model