mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
improving snap suggestions and pre-sorting
This commit is contained in:
@@ -207,6 +207,7 @@ class FlatpakManager(SoftwareManager):
|
||||
else:
|
||||
break
|
||||
|
||||
res.sort(key=lambda s: s.priority.value, reverse=True)
|
||||
return res
|
||||
|
||||
def is_default_enabled(self) -> bool:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
from datetime import datetime
|
||||
from threading import Thread
|
||||
from typing import List, Set, Type
|
||||
@@ -163,12 +164,14 @@ class SnapManager(SoftwareManager):
|
||||
t = Thread(target=self._fill_suggestion, args=(sug[0], sug[1], res))
|
||||
t.start()
|
||||
threads.append(t)
|
||||
time.sleep(0.001) # to avoid being blocked
|
||||
else:
|
||||
break
|
||||
|
||||
for t in threads:
|
||||
t.join()
|
||||
|
||||
res.sort(key=lambda s: s.priority.value, reverse=True)
|
||||
return res
|
||||
|
||||
def is_default_enabled(self) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user