Рефакторинг патчей, реализация Список патчей:
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, обновление описаний
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
"""
|
||||
Удаляет баннеры бета-версии
|
||||
Удаляет баннеры бета-версии
|
||||
|
||||
"disable_beta_banner": {
|
||||
"enabled": true
|
||||
}
|
||||
"""
|
||||
|
||||
priority = 0
|
||||
|
||||
# imports
|
||||
import os
|
||||
from tqdm import tqdm
|
||||
from lxml import etree
|
||||
|
||||
|
||||
# Patch
|
||||
def apply(config) -> bool:
|
||||
attributes = [
|
||||
"paddingTop",
|
||||
@@ -29,7 +36,8 @@ def apply(config) -> bool:
|
||||
root = tree.getroot()
|
||||
|
||||
for attr in attributes:
|
||||
# tqdm.write(f"set {attr} = 0.0dip")
|
||||
if config["verbose"]:
|
||||
tqdm.write(f"set {attr} = 0.0dip")
|
||||
root.set(f"{{{config["xml_ns"]['android']}}}{attr}", "0.0dip")
|
||||
|
||||
tree.write(
|
||||
|
||||
Reference in New Issue
Block a user