Remove __pycache__ from repo
This commit is contained in:
parent
9847b23210
commit
987f3e6609
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -122,7 +122,7 @@ async def show_reminder_details(
|
||||||
|
|
||||||
await callback.message.edit_text(
|
await callback.message.edit_text(
|
||||||
details_text,
|
details_text,
|
||||||
reply_markup=get_reminder_details_keyboard(reminder.id, reminder.is_active),
|
reply_markup=get_reminder_details_keyboard(reminder.id, reminder.is_active, page=callback_data.page),
|
||||||
parse_mode="HTML",
|
parse_mode="HTML",
|
||||||
)
|
)
|
||||||
await callback.answer()
|
await callback.answer()
|
||||||
|
|
@ -131,6 +131,7 @@ async def show_reminder_details(
|
||||||
@router.callback_query(ReminderActionCallback.filter(F.action == "back_to_list"))
|
@router.callback_query(ReminderActionCallback.filter(F.action == "back_to_list"))
|
||||||
async def back_to_reminders_list(
|
async def back_to_reminders_list(
|
||||||
callback: CallbackQuery,
|
callback: CallbackQuery,
|
||||||
|
callback_data: ReminderActionCallback,
|
||||||
session: AsyncSession,
|
session: AsyncSession,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
@ -153,7 +154,7 @@ async def back_to_reminders_list(
|
||||||
|
|
||||||
await callback.message.edit_text(
|
await callback.message.edit_text(
|
||||||
f"📋 Твои напоминания ({len(reminders)}):",
|
f"📋 Твои напоминания ({len(reminders)}):",
|
||||||
reply_markup=get_reminders_list_keyboard(reminders, page=0),
|
reply_markup=get_reminders_list_keyboard(reminders, page=callback_data.page),
|
||||||
)
|
)
|
||||||
await callback.answer()
|
await callback.answer()
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -15,8 +15,9 @@ class ReminderIntervalCallback(CallbackData, prefix="interval"):
|
||||||
|
|
||||||
class ReminderActionCallback(CallbackData, prefix="reminder"):
|
class ReminderActionCallback(CallbackData, prefix="reminder"):
|
||||||
"""Callback for reminder actions."""
|
"""Callback for reminder actions."""
|
||||||
action: str # done, snooze, pause, resume, delete, details, edit
|
action: str # done, snooze, pause, resume, delete, details, edit, back_to_list
|
||||||
reminder_id: int
|
reminder_id: int
|
||||||
|
page: int = 0
|
||||||
|
|
||||||
|
|
||||||
class ReminderEditCallback(CallbackData, prefix="edit"):
|
class ReminderEditCallback(CallbackData, prefix="edit"):
|
||||||
|
|
@ -170,7 +171,7 @@ def get_snooze_delay_keyboard(reminder_id: int) -> InlineKeyboardMarkup:
|
||||||
return keyboard
|
return keyboard
|
||||||
|
|
||||||
|
|
||||||
def get_reminder_details_keyboard(reminder_id: int, is_active: bool) -> InlineKeyboardMarkup:
|
def get_reminder_details_keyboard(reminder_id: int, is_active: bool, page: int = 0) -> InlineKeyboardMarkup:
|
||||||
"""
|
"""
|
||||||
Get keyboard for reminder details view.
|
Get keyboard for reminder details view.
|
||||||
|
|
||||||
|
|
@ -207,7 +208,7 @@ def get_reminder_details_keyboard(reminder_id: int, is_active: bool) -> InlineKe
|
||||||
[
|
[
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
text="⬅️ Назад к списку",
|
text="⬅️ Назад к списку",
|
||||||
callback_data=ReminderActionCallback(action="back_to_list", reminder_id=0).pack()
|
callback_data=ReminderActionCallback(action="back_to_list", reminder_id=0, page=page).pack()
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue