Closed DavidoTek closed 1 year ago
Maybe it would be useful to show this in the status bar as well. The ghapi_rlcheck
method would need to be updated or potentially a new method could be created to return a boolean to allow for checks on the ratelimit. Maybe returning a list/dictionary with one element being a boolean to represent whether the rate limit has been reached.
# pupgui2.py
def setup_ui(self):
# ...
if ghapi_rlcheck():
self.ui.statusBar().showMessage(f'{APP_NAME} {APP_VERSION}')
else:
self.ui.statusBar().showMessage(f'{APP_NAME} {APP_VERSION} - GitHub Rate Limit Exceeded')
# ...
Could always be done in a separate PR :smile: I also would like to say maybe showing a dialog would be useful, but I think only showing it when a user tries to download a compatibility tool would make the most sense. Users may open PUPQT offline for example on Steam Deck to remove or bulk update Proton versions. So the rate-limit warning dialog could only be shown if a user is online.
Just a small idea I had :-)
EDIT: Part of the foundation here, with updating the statusbar message based on various coniditions and being able to check if we're offline, was added as part of #164 which I just put up. We could check if GitHub is down as well as if the rate-limit is exceeded (probably in that order) and show/log various messages that way :-)
See https://github.com/DavidoTek/ProtonUp-Qt/issues/161