Skip to content

Commit

Permalink
Properly handle no flatpaks
Browse files Browse the repository at this point in the history
Make the UI properly handler itself when there are no installed flatpak
  • Loading branch information
heliguy4599 committed Oct 4, 2023
1 parent 39cb702 commit 896f078
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/orphans_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,13 @@ def sizeThread(self, row, path):

# 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)
Expand Down
2 changes: 1 addition & 1 deletion src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def __init__(self, **kwargs):
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

Expand Down

0 comments on commit 896f078

Please sign in to comment.