Properly handle no flatpaks

Make the UI properly handler itself when there are no installed flatpak
This commit is contained in:
heliguy4599
2023-10-04 18:09:12 -04:00
parent 39cb702c43
commit 896f078ed7
2 changed files with 7 additions and 2 deletions

View File

@@ -165,8 +165,13 @@ class OrphansWindow(Adw.Window):
# Create the list of folders in the window
def generateList(self):
self.host_flatpaks = self.my_utils.getHostFlatpaks()
if self.host_flatpaks == [['', '']]:
self.app_window.toast_overlay.add_toast(Adw.Toast.new(_("Could not manage data")))
self.this_just_crashes_the_window_so_it_doesnt_open()
return
self.list_of_data.remove_all()
self.selected_dirs = []
self.set_title(self.window_title)

View File

@@ -522,7 +522,7 @@ class WarehouseWindow(Adw.ApplicationWindow):
self.settings.bind("is-maximized", self, "maximized", Gio.SettingsBindFlags.DEFAULT)
self.settings.bind("is-fullscreen", self, "fullscreened", Gio.SettingsBindFlags.DEFAULT)
if self.host_flatpaks == [['']]:
if self.host_flatpaks == [['', '']]:
self.windowSetEmpty(True)
return