mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 20:54:15 +02:00
app suggenstions when no app is installed
This commit is contained in:
@@ -137,3 +137,18 @@ class SnapManager(ApplicationManager):
|
||||
def list_warnings(self) -> List[str]:
|
||||
if snap.get_snapd_version() == 'unavailable':
|
||||
return [self.locale_keys['snap.notification.snapd_unavailable']]
|
||||
|
||||
def list_suggestions(self, limit: int) -> List[SnapApplication]:
|
||||
|
||||
suggestions = []
|
||||
|
||||
if limit != 0:
|
||||
for name in ('whatsdesk', 'slack', 'yakyak', 'instagraph', 'eclipse', 'gimp', 'supertuxkart'):
|
||||
res = snap.search(name, exact_name=True)
|
||||
if res:
|
||||
suggestions.append(self.map_json(res[0], installed=False, disk_loader=None))
|
||||
|
||||
if len(suggestions) == limit:
|
||||
break
|
||||
|
||||
return suggestions
|
||||
|
||||
Reference in New Issue
Block a user