mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 05:54:15 +02:00
app suggenstions when no app is installed
This commit is contained in:
@@ -90,6 +90,10 @@ class ApplicationManager(ABC):
|
||||
def list_warnings(self) -> List[str]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def list_suggestions(self, limit: int) -> List[Application]:
|
||||
pass
|
||||
|
||||
|
||||
class GenericApplicationManager(ApplicationManager):
|
||||
|
||||
@@ -285,3 +289,11 @@ class GenericApplicationManager(ApplicationManager):
|
||||
warnings.extend(man_warnings)
|
||||
|
||||
return warnings
|
||||
|
||||
def list_suggestions(self, limit: int) -> List[Application]:
|
||||
if self.managers:
|
||||
suggestions = []
|
||||
for man in self.managers:
|
||||
if self._is_enabled(man):
|
||||
suggestions.extend(man.list_suggestions(5))
|
||||
return suggestions
|
||||
|
||||
Reference in New Issue
Block a user