Support chinese variant, QQ object in launcher and some code optimizations

This commit is contained in:
2022-02-16 00:49:33 +07:00
parent 048a7ac9d0
commit c22918673b
19 changed files with 389 additions and 58 deletions

View File

@ -16,9 +16,10 @@ class IconButton:
- :class:`str` qr_img: The QR code url.
- :class:`str` qr_desc: The QR code description.
- :class:`str` img_hover: The icon url when hovered over.
- :class:`dict[LauncherIconOtherLink]` other_links: Other links in the button.
- :class:`dict` raw: The launcher background raw information in dict.
- :class:`list[LauncherIconOtherLink]` other_links: Other links in the button.
- :class:`dict` raw: The launcher background raw information.
"""
def __init__(self, icon_id, img, tittle, url, qr_img, qr_desc, img_hover, other_links, raw):
"""Inits the launcher icon class"""
self.icon_id = icon_id
@ -38,5 +39,4 @@ class IconButton:
for link in data['other_links']:
other_links.append(IconOtherLink.from_dict(link))
return IconButton(data["icon_id"], data["img"], data["tittle"], data["url"], data["qr_img"],
data["qr_desc"], data["img_hover"], other_links, data)
data["qr_desc"], data["img_hover"], other_links, data)