Skip to content

Commit

Permalink
🐛 修复功能少时zhenxun帮助图片排序问题 (#1620)
Browse files Browse the repository at this point in the history
  • Loading branch information
HibiKier authored Sep 11, 2024
1 parent 95762bd commit a8355fb
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions zhenxun/builtin_plugins/help/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async def build_ss_image(self, bot_id: str, group_id: str | None) -> bytes:
)
max_len = 0
flag_index = -1
max_data = None
max_data = {}
plugin_list = []
for index, plu in enumerate(classify.keys()):
data = {
Expand All @@ -124,9 +124,24 @@ async def build_ss_image(self, bot_id: str, group_id: str | None) -> bytes:
max_data = data
plugin_list.append(data)
del plugin_list[flag_index]
plugin_list.insert(0, max_data)
# plugin_list.insert(0, max_data)
_data = []
_left = 30
_pu1 = []
_pu2 = []
for i in range(len(max_data["items"])):
if i % 2:
_pu1.append(max_data["items"][i])
else:
_pu2.append(max_data["items"][i])
_plugins = [(30, 50, _pu1), (0, 50, _pu2)]
_data.append(
{
"name": max_data["name"],
"items": [(30, 50, _pu1), (0, 50, _pu2)],
"width": 100,
}
)
for plugin in plugin_list:
_plugins = []
width = 50
Expand Down

0 comments on commit a8355fb

Please # to comment.