1
0
Fork 0
mirror of https://github.com/Radiquum/anixart-patcher.git synced 2025-09-08 12:13:51 +05:00

chore: formatting files

This commit is contained in:
Kentai Radiquum 2025-09-03 18:40:48 +05:00
parent e12967efaf
commit 1e84f31eb0
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
5 changed files with 13 additions and 35 deletions

View file

@ -30,7 +30,7 @@ def modify_menu(menu: list[str], path: str) -> None:
log.warning(f"menu item `{item}` is not allowed, removing from list")
menu.remove(item)
root = etree.Element("menu", nsmap={"android": config['xml_ns']['android']})
root = etree.Element("menu", nsmap={"android": config["xml_ns"]["android"]})
for item in menu:
element = etree.SubElement(root, "item")
element.set(f"{{{config['xml_ns']['android']}}}icon", f"@drawable/nav_{item}")
@ -47,6 +47,11 @@ def modify_menu(menu: list[str], path: str) -> None:
def apply(patch_conf: PatchConfig_ChangeNavigationBar) -> bool:
modify_menu(patch_conf["portrait"], f"{config['folders']['decompiled']}/res/menu/bottom.xml")
modify_menu(patch_conf["landscape"], f"{config['folders']['decompiled']}/res/menu/navigation_rail_menu.xml")
modify_menu(
patch_conf["portrait"], f"{config['folders']['decompiled']}/res/menu/bottom.xml"
)
modify_menu(
patch_conf["landscape"],
f"{config['folders']['decompiled']}/res/menu/navigation_rail_menu.xml",
)
return True