[web] new save_icon attr for WebApplication | fix removing non existing config dir

This commit is contained in:
Vinícius Moreira
2019-12-19 12:42:20 -03:00
parent 8da60c3a70
commit 7cf79a9cff
2 changed files with 8 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ class WebApplication(SoftwarePackage):
def __init__(self, id: str = None, url: str = None, name: str = None, description: str = None, icon_url: str = None,
installation_dir: str = None, desktop_entry: str = None, installed: bool = False, version: str = None,
categories: List[str] = None, custom_icon: str = None, preset_options: List[str] = None, is_suggestion: bool = False):
categories: List[str] = None, custom_icon: str = None, preset_options: List[str] = None, save_icon: bool = False):
super(WebApplication, self).__init__(id=id if id else url, name=name, description=description,
icon_url=icon_url, installed=installed, version=version,
categories=categories)
@@ -21,7 +21,7 @@ class WebApplication(SoftwarePackage):
self.desktop_entry = desktop_entry
self.set_custom_icon(custom_icon)
self.preset_options = preset_options
self.is_suggestion = is_suggestion
self.save_icon = save_icon # if the icon_url should be used instead of the one retrieved by nativefier
def set_version(self, version: str):
self.version = str(version) if version else None
@@ -31,7 +31,7 @@ class WebApplication(SoftwarePackage):
return False
def has_info(self):
return self.installed
return True
@staticmethod
def _get_cached_attrs() -> tuple: