Skip to content

Commit

Permalink
Make filter show no flatpaks status page
Browse files Browse the repository at this point in the history
If a filter is configured in such a way that no flatpaks will be shown, the no flatpaks status page is shown
  • Loading branch information
heliguy4599 committed Oct 4, 2023
1 parent 84e7f5a commit a47885d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def applyFilter(self, filter=[True, False, ["all"], ["all"]]):
show_runtimes = filter[1]
filter_install_type = filter[2]
filter_remotes_list = filter[3]
total_visible = 0

for i in range(len(self.flatpak_rows)):
self.flatpak_rows[i][0] = True
Expand All @@ -498,6 +499,17 @@ def applyFilter(self, filter=[True, False, ["all"], ["all"]]):

self.flatpak_rows[i][2].set_visible(self.flatpak_rows[i][0])

if self.flatpak_rows[i][0]:
total_visible += 1

if total_visible > 0:
#self.main_stack.set_visible_child(self.main_box)
self.windowSetEmpty(False)
else:
# self.main_stack.set_visible_child(self.no_flatpaks)
self.windowSetEmpty(True)
self.filter_button.set_sensitive(True)

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.my_utils = myUtils(self)
Expand Down

0 comments on commit a47885d

Please sign in to comment.