Fix Arcane refresh edit markup
This commit is contained in:
@@ -21,7 +21,7 @@ async def cmd_arcane_projects(msg: Message, *, edit: bool):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if edit:
|
if edit:
|
||||||
await msg.edit_text("⏳ Arcane projects…", reply_markup=arcane_kb)
|
await msg.edit_text("⏳ Arcane projects…")
|
||||||
else:
|
else:
|
||||||
await msg.answer("⏳ Arcane projects…", reply_markup=arcane_kb)
|
await msg.answer("⏳ Arcane projects…", reply_markup=arcane_kb)
|
||||||
|
|
||||||
@@ -49,11 +49,11 @@ async def cmd_arcane_projects(msg: Message, *, edit: bool):
|
|||||||
InlineKeyboardButton(text="⏹", callback_data=f"arcane:down:{pid}"),
|
InlineKeyboardButton(text="⏹", callback_data=f"arcane:down:{pid}"),
|
||||||
])
|
])
|
||||||
|
|
||||||
kb = InlineKeyboardMarkup(inline_keyboard=rows) if rows else arcane_kb
|
kb_inline = InlineKeyboardMarkup(inline_keyboard=rows) if rows else None
|
||||||
if edit:
|
if edit:
|
||||||
await msg.edit_text("\n".join(lines), reply_markup=kb)
|
await msg.edit_text("\n".join(lines), reply_markup=kb_inline)
|
||||||
else:
|
else:
|
||||||
await msg.answer("\n".join(lines), reply_markup=kb)
|
await msg.answer("\n".join(lines), reply_markup=kb_inline or arcane_kb)
|
||||||
|
|
||||||
asyncio.create_task(worker())
|
asyncio.create_task(worker())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user