DavidoTek / ProtonUp-Qt

Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface.
https://davidotek.github.io/protonup-qt
GNU General Public License v3.0
1.22k stars 40 forks source link

Don't update statusbar to fetch releases when offline #166

Closed sonic2kk closed 1 year ago

sonic2kk commented 1 year ago

Fixes a small oversight from #164.

In my tests for that PR I opened ProtonUp-Qt offline to make sure it came up with "(offline)", and then re-connected and opened the compat tool dialog. What I somehow didn't think about was pressing this button while offline. If you do this while offline, the status bar will get stuck on "Fetching releases..."

This just updates the conditional to only update the statusbar text if we can connect to the internet, using the is_online method.

There are a couple of other things around offline functionality to consider, like right now there is an error when trying to fetch information from GitHub about the compattool while offline. But those are other issues that as far as I can tell don't have any user-facing impact, they're just """ugly""" in the command line, so I didn't address them here.

Thanks!

P.S. No rush on review/merge, it's the holidays!! :christmas_tree:

DavidoTek commented 1 year ago

Yeah, seems like a good idea to always have the offline indicator there. Before, the "offline" message just disappeared and you didn't know why it wasn't working.

they're just """ugly""" in the command line

I think we can leave the commandline "ugly". It's for debugging anyway and you cannot have too much details ;)

Thanks! :christmas_tree: :christmas_tree: :christmas_tree: