[snap] fix: not showing Launch button after recent application installation

This commit is contained in:
Vinicius Moreira
2019-10-17 18:03:06 -03:00
parent 6cdf4f5746
commit 7c31575329
2 changed files with 31 additions and 6 deletions

View File

@@ -125,7 +125,12 @@ class SnapManager(SoftwareManager):
raise Exception("'get_history' is not supported by {}".format(pkg.__class__.__name__))
def install(self, pkg: SnapApplication, root_password: str, watcher: ProcessWatcher) -> bool:
return ProcessHandler(watcher).handle(SystemProcess(subproc=snap.install_and_stream(pkg.name, pkg.confinement, root_password)))
res = ProcessHandler(watcher).handle(SystemProcess(subproc=snap.install_and_stream(pkg.name, pkg.confinement, root_password)))
if res:
pkg.has_apps_field = snap.has_apps_field(pkg.name, self.ubuntu_distro)
return res
def is_enabled(self) -> bool:
return self.enabled