[flatpak] fix update-check for 1.5.x | [appimage] tray update notifications

This commit is contained in:
Vinicius Moreira
2019-10-11 19:12:19 -03:00
parent c6cdfe30d0
commit 391bac7943
3 changed files with 16 additions and 3 deletions

View File

@@ -25,6 +25,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixes
- Snap:
- retrieving installed applications information for Ubuntu based distros
- Flatpak:
- update check for version 1.5.X
### AppImage support
- Search, install, uninstall, downgrade, launch and retrieve the applications history

View File

@@ -353,8 +353,15 @@ class AppImageManager(SoftwareManager):
self.dbs_updater.start()
def list_updates(self, internet_available: bool) -> List[PackageUpdate]:
# TODO
pass
res = self.read_installed(disk_loader=None, internet_available=internet_available)
updates = []
if res.installed:
for app in res.installed:
if app.update:
updates.append(PackageUpdate(pkg_id=app.name, pkg_type='appimage', version=app.latest_version))
return updates
def list_warnings(self) -> List[str]:
pass

View File

@@ -100,7 +100,11 @@ class FlatpakManager(SoftwareManager):
for app_json in installed:
model = self._map_to_model(app_json=app_json, installed=True,
disk_loader=disk_loader, internet=internet_available)
model.update = app_json['ref'] in updates[0] if updates else None
if version >= '1.5.0':
model.update = '{}/{}'.format(app_json['id'], app_json['branch']) in updates[0] if updates else None
else:
model.update = app_json['ref'] in updates[0] if updates else None
models.append(model)
return SearchResult(models, None, len(models))