mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-10 15:34:15 +02:00
suggestions fix
This commit is contained in:
@@ -291,15 +291,18 @@ class GenericApplicationManager(ApplicationManager):
|
|||||||
|
|
||||||
return warnings
|
return warnings
|
||||||
|
|
||||||
def _fill_suggestions(self, suggestions: list, man: ApplicationManager):
|
def _fill_suggestions(self, suggestions: list, man: ApplicationManager, limit: int):
|
||||||
if self._is_enabled(man):
|
if self._is_enabled(man):
|
||||||
suggestions.extend(man.list_suggestions(6))
|
man_sugs = man.list_suggestions(limit)
|
||||||
|
|
||||||
|
if man_sugs:
|
||||||
|
suggestions.extend(man_sugs)
|
||||||
|
|
||||||
def list_suggestions(self, limit: int) -> List[Application]:
|
def list_suggestions(self, limit: int) -> List[Application]:
|
||||||
if self.managers:
|
if self.managers:
|
||||||
suggestions, threads = [], []
|
suggestions, threads = [], []
|
||||||
for man in self.managers:
|
for man in self.managers:
|
||||||
t = Thread(target=self._fill_suggestions, args=(suggestions, man))
|
t = Thread(target=self._fill_suggestions, args=(suggestions, man, limit))
|
||||||
t.start()
|
t.start()
|
||||||
threads.append(t)
|
threads.append(t)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user