Stop wrong remote from being used in SearchInstall

When having at least 1 disabled remote and only 1 enabled remote, stop Search Install from choosing a disabled remote automatically
This commit is contained in:
Heliguy
2024-04-06 23:26:44 -04:00
parent 3b6e4f6e72
commit ed4b14fd50

View File

@@ -103,8 +103,12 @@ class SearchInstallWindow(Adw.Dialog):
if total < 2:
self.nav_view.push(self.results_page)
self.results_page.set_can_pop(False)
self.search_remote = self.host_remotes[0][0]
self.install_type = self.host_remotes[0][7]
for rem in self.host_remotes:
if self.my_utils.get_install_type(rem[7]) != "disabled":
self.search_remote = rem[0]
break
if "user" in self.install_type:
self.install_type = "user"
if "system" in self.install_type: