mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 17:59:43 +02:00
refactor: clean up unused imports and improve code organization
This commit is contained in:
@@ -76,6 +76,7 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
||||
if state.ignore_updates is False:
|
||||
if platform.system() == "Windows":
|
||||
result = check_for_updates()
|
||||
if result != (None, None):
|
||||
assets, latest_version = result
|
||||
|
||||
if assets:
|
||||
|
||||
@@ -12,7 +12,7 @@ class AppState(QObject):
|
||||
self.post_urls: List[str] = []
|
||||
self.post_author: List[str] = []
|
||||
self.downloads: List[str] = []
|
||||
self.version: str
|
||||
self.version: str = "dev"
|
||||
self._image_path: str = ""
|
||||
self.ignore_updates: bool = False
|
||||
self.debug: bool = False
|
||||
|
||||
@@ -30,6 +30,8 @@ def check_for_updates():
|
||||
for asset in assets:
|
||||
print(f" - {asset['name']}: {asset['browser_download_url']}")
|
||||
return assets, latest_version
|
||||
else:
|
||||
return None, None
|
||||
else:
|
||||
if state.debug:
|
||||
print("Already up-to-date.")
|
||||
|
||||
Reference in New Issue
Block a user