mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
hide feature flags on patched versions
This commit is contained in:
@@ -11,15 +11,19 @@ class Device:
|
|||||||
self.locale = locale
|
self.locale = locale
|
||||||
self.ld = ld
|
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:
|
def supported(self) -> bool:
|
||||||
parsed_ver: Version = Version(self.version)
|
parsed_ver: Version = Version(self.version)
|
||||||
if parsed_ver > Version("18.1"):
|
if parsed_ver > Version("18.1"):
|
||||||
return False
|
return False
|
||||||
if (parsed_ver == Version("18.1")
|
return self.has_exploit()
|
||||||
and self.build != "22B5007p" and self.build != "22B5023e"
|
|
||||||
and self.build != "22B5034e" and self.build != "22B5045g"):
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
class Version:
|
class Version:
|
||||||
def __init__(self, major: int, minor: int = 0, patch: int = 0):
|
def __init__(self, major: int, minor: int = 0, patch: int = 0):
|
||||||
|
|||||||
@@ -240,7 +240,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
if Version(self.device_manager.data_singleton.current_device.version) >= Version("18.0"):
|
if Version(self.device_manager.data_singleton.current_device.version) >= Version("18.0"):
|
||||||
self.ui.aodChk.show()
|
self.ui.aodChk.show()
|
||||||
self.ui.iphone16SettingsChk.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
|
# show the other dynamic island options
|
||||||
self.ui.dynamicIslandDrp.addItem("2622 (iPhone 16 Pro Dynamic Island)")
|
self.ui.dynamicIslandDrp.addItem("2622 (iPhone 16 Pro Dynamic Island)")
|
||||||
self.ui.dynamicIslandDrp.addItem("2868 (iPhone 16 Pro Max Dynamic Island)")
|
self.ui.dynamicIslandDrp.addItem("2868 (iPhone 16 Pro Max Dynamic Island)")
|
||||||
|
|||||||
Reference in New Issue
Block a user