suggestions button implemented respecting already installed applications

This commit is contained in:
Vinícius Moreira
2019-12-23 13:04:51 -03:00
parent 4696fc34d4
commit c29b1a0252
13 changed files with 270 additions and 27 deletions

View File

@@ -848,7 +848,10 @@ class ArchManager(SoftwareManager):
if l:
if limit <= 0 or len(suggestions) < limit:
lsplit = l.split('=')
suggestions[lsplit[1].strip()] = SuggestionPriority(int(lsplit[0]))
name = lsplit[1].strip()
if not filter_installed or not pacman.check_installed(name):
suggestions[name] = SuggestionPriority(int(lsplit[0]))
api_res = self.aur_client.get_info(suggestions.keys())