From ab9a4152b14d26b633d2cafb85f36ecd93154e3e Mon Sep 17 00:00:00 2001
From: leminlimez <59540996+leminlimez@users.noreply.github.com>
Date: Mon, 7 Oct 2024 18:48:54 -0400
Subject: [PATCH] show build number
---
devicemanagement/device_manager.py | 6 ++++++
gui/main_window.py | 12 +++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/devicemanagement/device_manager.py b/devicemanagement/device_manager.py
index 2b0d52a..891579a 100644
--- a/devicemanagement/device_manager.py
+++ b/devicemanagement/device_manager.py
@@ -88,6 +88,12 @@ class DeviceManager:
else:
return self.data_singleton.current_device.version
+ def get_current_device_build(self) -> str:
+ if self.data_singleton.current_device == None:
+ return ""
+ else:
+ return self.data_singleton.current_device.build
+
def get_current_device_uuid(self) -> str:
if self.data_singleton.current_device == None:
return ""
diff --git a/gui/main_window.py b/gui/main_window.py
index eec8c3d..2d85525 100644
--- a/gui/main_window.py
+++ b/gui/main_window.py
@@ -251,7 +251,7 @@ class MainWindow(QtWidgets.QMainWindow):
else:
self.device_manager.set_current_device(index=None)
self.ui.featureFlagsPageBtn.hide()
-
+
# update the interface
self.updateInterfaceForNewDevice()
@@ -307,9 +307,10 @@ class MainWindow(QtWidgets.QMainWindow):
self.ui.phoneNameLbl.setText(self.device_manager.get_current_device_name())
# version label
ver = self.device_manager.get_current_device_version()
+ build = self.device_manager.get_current_device_build()
self.show_uuid = False
if ver != "":
- self.show_version_text(version=ver)
+ self.show_version_text(version=ver, build=build)
else:
self.ui.phoneVersionLbl.setText("Please connect a device.")
@@ -317,22 +318,23 @@ class MainWindow(QtWidgets.QMainWindow):
if self.show_uuid:
self.show_uuid = False
ver = self.device_manager.get_current_device_version()
+ build = self.device_manager.get_current_device_build()
if ver != "":
- self.show_version_text(version=ver)
+ self.show_version_text(version=ver, build=build)
else:
self.show_uuid = True
uuid = self.device_manager.get_current_device_uuid()
if uuid != "":
self.ui.phoneVersionLbl.setText(f"{uuid}")
- def show_version_text(self, version: str):
+ def show_version_text(self, version: str, build: str):
support_str: str = "Supported!"
if Version(version) < Version("17.0"):
support_str = "Not Supported."
elif not self.device_manager.get_current_device_supported():
# sparserestore partially patched
support_str = "Supported, YMMV."
- self.ui.phoneVersionLbl.setText(f"iOS {version} {support_str}")
+ self.ui.phoneVersionLbl.setText(f"iOS {version} ({build}) {support_str}")
## HOME PAGE LINKS
def on_bigMilkBtn_clicked(self):