hide feature flags on patched versions

This commit is contained in:
leminlimez
2024-10-23 11:12:22 -04:00
parent 6f1bd0df04
commit 7bc88eeadc
2 changed files with 11 additions and 6 deletions

View File

@@ -11,15 +11,19 @@ class Device:
self.locale = locale
self.ld = ld
def has_exploit(self) -> bool:
parsed_ver: Version = Version(self.version)
if (parsed_ver < Version("18.1")
or self.build == "22B5007p" or self.build == "22B5023e"
or self.build == "22B5034e" or self.build == "22B5045g"):
return True
return False
def supported(self) -> bool:
parsed_ver: Version = Version(self.version)
if parsed_ver > Version("18.1"):
return False
if (parsed_ver == Version("18.1")
and self.build != "22B5007p" and self.build != "22B5023e"
and self.build != "22B5034e" and self.build != "22B5045g"):
return False
return True
return self.has_exploit()
class Version:
def __init__(self, major: int, minor: int = 0, patch: int = 0):

View File

@@ -240,7 +240,8 @@ class MainWindow(QtWidgets.QMainWindow):
if Version(self.device_manager.data_singleton.current_device.version) >= Version("18.0"):
self.ui.aodChk.show()
self.ui.iphone16SettingsChk.show()
self.ui.featureFlagsPageBtn.show()
if self.device_manager.data_singleton.current_device.has_exploit():
self.ui.featureFlagsPageBtn.show()
# show the other dynamic island options
self.ui.dynamicIslandDrp.addItem("2622 (iPhone 16 Pro Dynamic Island)")
self.ui.dynamicIslandDrp.addItem("2868 (iPhone 16 Pro Max Dynamic Island)")