fix: not showing correctly the latest flatpak app versions when bringing the search results

This commit is contained in:
Vinicius Moreira
2019-08-09 14:50:07 -03:00
parent b7d1314adf
commit ccbd57df22
3 changed files with 6 additions and 2 deletions

View File

@@ -10,7 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- search response takes an average of 20% less time ( reaching 35% for several results )
- app boot takes 98% less time when snapd is installed, but disabled
- FPAKMAN_TRAY (--tray) is not enabled by default (0).
### Fixes:
### Fixes
- not showing correctly the latest flatpak app versions when bringing the search results
- [flatpak dependency](https://github.com/vinifmor/fpakman/issues/36)
## [0.5.0] - 2019-08-06

View File

@@ -48,6 +48,9 @@ class FlatpakAsyncDataLoader(AsyncDataLoader):
if not self.app.base_data.version and self.app.base_data.latest_version:
self.app.base_data.version = self.app.base_data.latest_version
if not self.app.installed and self.app.base_data.latest_version:
self.app.base_data.version = self.app.base_data.latest_version
if self.app.base_data.icon_url and self.app.base_data.icon_url.startswith('/'):
self.app.base_data.icon_url = FLATHUB_URL + self.app.base_data.icon_url

View File

@@ -315,7 +315,7 @@ class AppsTable(QTableWidget):
label_version.setStyleSheet("color: #4EC306; font-weight: bold")
tooltip = self.window.locale_keys['version.installed_outdated']
if app_v.model.base_data.version and app_v.model.base_data.latest_version and app_v.model.base_data.version < app_v.model.base_data.latest_version:
if app_v.model.installed and app_v.model.base_data.version and app_v.model.base_data.latest_version and app_v.model.base_data.version < app_v.model.base_data.latest_version:
tooltip = '{}. {}: {}'.format(tooltip, self.window.locale_keys['version.latest'], app_v.model.base_data.latest_version)
label_version.setText(label_version.text() + ' > {}'.format(app_v.model.base_data.latest_version))