settings_urls: ✔ enabled disable_ad: ✔ enabled disable_beta_banner: ✔ enabled insert_new: ✔ enabled color_theme: ✔ enabled change_server: ✘ disabled package_name: ✔ enabled replace_navbar: ✔ enabled compress: ✔ enabled, обновление описаний
48 lines
1.2 KiB
Python
48 lines
1.2 KiB
Python
"""
|
|
Вставляет новые файлы в проект
|
|
|
|
"insert_new": {
|
|
"enabled": true
|
|
}
|
|
"""
|
|
|
|
priority = 0
|
|
|
|
# imports
|
|
import os
|
|
import shutil
|
|
from utils.public import insert_after_public
|
|
|
|
|
|
# Patch
|
|
def apply(config: dict) -> bool:
|
|
# Mod first launch window
|
|
shutil.copytree(
|
|
"./patches/resources/smali_classes4/", "./decompiled/smali_classes4/"
|
|
)
|
|
|
|
# Mod assets
|
|
shutil.copy("./patches/resources/avatar.png", "./decompiled/assets/avatar.png")
|
|
shutil.copy(
|
|
"./patches/resources/OpenSans-Regular.ttf",
|
|
"./decompiled/assets/OpenSans-Regular.ttf",
|
|
)
|
|
shutil.copy(
|
|
"./patches/resources/ic_custom_crown.xml",
|
|
"./decompiled/res/drawable/ic_custom_crown.xml",
|
|
)
|
|
shutil.copy(
|
|
"./patches/resources/ic_custom_telegram.xml",
|
|
"./decompiled/res/drawable/ic_custom_telegram.xml",
|
|
)
|
|
shutil.copy(
|
|
"./patches/resources/ytsans_medium.ttf",
|
|
"./decompiled/res/font/ytsans_medium.ttf",
|
|
)
|
|
os.remove("./decompiled/res/font/ytsans_medium.otf")
|
|
|
|
insert_after_public("warning_error_counter_background", "ic_custom_telegram")
|
|
insert_after_public("warning_error_counter_background", "ic_custom_crown")
|
|
|
|
return True
|