Обновление вывода информации о патчах, добавление патча лайков/дизлайков

This commit is contained in:
2025-10-11 18:40:44 +03:00
parent b646dbf6fe
commit 28c60aa7a3
27 changed files with 313 additions and 114 deletions
+7 -7
View File
@@ -1,5 +1,4 @@
"""
Добавляет в настройки ссылки и добвляет текст к версии приложения
"""Добавляет в настройки ссылки и добвляет текст к версии приложения
"settings_urls": {
"enabled": true,
@@ -61,7 +60,7 @@ DEFAULT_MENU = {
"Прочее": [
{
"title": "Помочь проекту",
"description": "Вы можете помочь нам в разработке мода, написании кода или тестировании.",
"description": "Вы можете помочь нам с идеями, написанием кода или тестированием.",
"url": "https://git.wowlikon.tech/anixart-mod",
"icon": "@drawable/ic_custom_crown",
"icon_space_reserved": "false"
@@ -94,6 +93,7 @@ def make_category(ns, name, items):
return cat
def apply(config: Config, base: Dict[str, Any]) -> bool:
# Добавление кастомных иконок
shutil.copy(
"./resources/ic_custom_crown.xml",
"./decompiled/res/drawable/ic_custom_crown.xml",
@@ -111,16 +111,16 @@ def apply(config: Config, base: Dict[str, Any]) -> bool:
tree = etree.parse(file_path, parser)
root = tree.getroot()
# Insert new PreferenceCategory before the last element
last = root[-1] # last element
pos = root.index(last)
# Вставка новых пунктов перед последним
pos = root.index(root[-1])
for section, items in config.menu.items():
root.insert(pos, make_category(base["xml_ns"], section, items))
pos += 1
# 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",