mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 03:34:15 +02:00
[arch] improvement -> repositories/AUR search time
This commit is contained in:
@@ -28,6 +28,17 @@ class SearchResult:
|
||||
self.new = new
|
||||
self.total = total
|
||||
|
||||
def update_total(self):
|
||||
total = 0
|
||||
|
||||
if self.installed:
|
||||
total += len(self.installed)
|
||||
|
||||
if self.new:
|
||||
total += len(self.new)
|
||||
|
||||
self.total = total
|
||||
|
||||
@classmethod
|
||||
def empty(cls):
|
||||
return cls(installed=[], new=[], total=0)
|
||||
|
||||
Reference in New Issue
Block a user