diff --git a/config.json b/config.json
index 2a2a5fc..e9b81e4 100644
--- a/config.json
+++ b/config.json
@@ -38,6 +38,9 @@
"to": "#ffccff00"
}
},
+ "replace_navbar": {
+ "items": ["home", "discover", "feed", "bookmarks", "profile"]
+ },
"custom_speed": {
"speeds": [9.0]
},
@@ -68,14 +71,15 @@
],
"Прочее": [
{
- "title": "Поддержать проект",
- "description": "После пожертвования вы сможете выбрать в своём профиле любую роль, например «Кошка-девочка», которая будет видна всем пользователям мода.",
+ "title": "Помочь проекту",
+ "description": "Вы можете помочь нам в разработке мода, написании кода или тестировании.",
"url": "https://t.me/wowlikon",
"icon": "@drawable/ic_custom_crown",
"icon_space_reserved": "false"
}
]
- }
+ },
+ "version": " by wowlikon"
}
}
}
diff --git a/patches/color_theme.py b/patches/color_theme.py
index 24e5928..8cdd0eb 100644
--- a/patches/color_theme.py
+++ b/patches/color_theme.py
@@ -9,6 +9,7 @@ from utils.public import (
change_color,
)
+
def apply(config: dict) -> bool:
main_color = config["colors"]["primary"]
splash_color = config["colors"]["secondary"]
diff --git a/patches/replace_navbar.py b/patches/replace_navbar.py
new file mode 100644
index 0000000..bdbece0
--- /dev/null
+++ b/patches/replace_navbar.py
@@ -0,0 +1,41 @@
+"""Replace navbar items"""
+priority = 0
+
+from lxml import etree
+from tqdm import tqdm
+
+def apply(config: dict) -> bool:
+ file_path = "./decompiled/res/menu/bottom.xml"
+
+ parser = etree.XMLParser(remove_blank_text=True)
+ tree = etree.parse(file_path, parser)
+ root = tree.getroot()
+
+ items = root.findall("item", namespaces=config['xml_ns'])
+
+ def get_id_suffix(item):
+ full_id = item.get(f"{{{config['xml_ns']['android']}}}id")
+ return full_id.split("tab_")[-1] if full_id else None
+
+ items_by_id = {get_id_suffix(item): item for item in items}
+ existing_order = [get_id_suffix(item) for item in items]
+
+ ordered_items = []
+ for key in config['items']:
+ if key in items_by_id:
+ ordered_items.append(items_by_id[key])
+
+ extra = [i for i in items if get_id_suffix(i) not in config['items']]
+ if extra:
+ tqdm.write("⚠Найдены лишние элементы: " + str([get_id_suffix(i) for i in extra]))
+ ordered_items.extend(extra)
+
+ for i in root.findall("item", namespaces=config['xml_ns']):
+ root.remove(i)
+
+ for item in ordered_items:
+ root.append(item)
+
+ tree.write(file_path, pretty_print=True, xml_declaration=True, encoding="utf-8")
+
+ return True
diff --git a/patches/settings_urls.py b/patches/settings_urls.py
index 22a8b40..d75a9c6 100644
--- a/patches/settings_urls.py
+++ b/patches/settings_urls.py
@@ -38,4 +38,19 @@ def apply(config: dict) -> bool:
# Save back
tree.write(file_path, pretty_print=True, xml_declaration=True, encoding="utf-8")
+
+ filepaths = [
+ "./decompiled/smali_classes2/com/swiftsoft/anixartd/ui/activity/UpdateActivity.smali",
+ "./decompiled/smali_classes2/com/swiftsoft/anixartd/ui/fragment/main/preference/MainPreferenceFragment.smali",
+ ]
+ for filepath in filepaths:
+ content = ""
+ with open(filepath, "r", encoding="utf-8") as file:
+ for line in file.readlines():
+ if '"\u0412\u0435\u0440\u0441\u0438\u044f'.encode("unicode_escape").decode() in line:
+ content += line[:line.rindex('"')] + config["version"] + line[line.rindex('"'):]
+ else:
+ content += line
+ with open(filepath, "w", encoding="utf-8") as file:
+ file.write(content)
return True
diff --git a/todo_drafts/todo1.txt b/todo_drafts/todo1.txt
index cbf0e14..4f5b712 100644
--- a/todo_drafts/todo1.txt
+++ b/todo_drafts/todo1.txt
@@ -1,2 +1,27 @@
-/res/menu/bottom.xml
-replace lines
+/res/layout/release_info.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/todo_drafts/todo2.txt b/todo_drafts/todo2.txt
deleted file mode 100644
index 4f5b712..0000000
--- a/todo_drafts/todo2.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-/res/layout/release_info.xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-