diff --git a/bot/__pycache__/main.cpython-312.pyc b/bot/__pycache__/main.cpython-312.pyc deleted file mode 100644 index 0007366..0000000 Binary files a/bot/__pycache__/main.cpython-312.pyc and /dev/null differ diff --git a/bot/core/__pycache__/bot.cpython-312.pyc b/bot/core/__pycache__/bot.cpython-312.pyc deleted file mode 100644 index 78dceb1..0000000 Binary files a/bot/core/__pycache__/bot.cpython-312.pyc and /dev/null differ diff --git a/bot/core/__pycache__/middlewares.cpython-312.pyc b/bot/core/__pycache__/middlewares.cpython-312.pyc deleted file mode 100644 index 280ce1f..0000000 Binary files a/bot/core/__pycache__/middlewares.cpython-312.pyc and /dev/null differ diff --git a/bot/core/__pycache__/scheduler.cpython-312.pyc b/bot/core/__pycache__/scheduler.cpython-312.pyc deleted file mode 100644 index 5741813..0000000 Binary files a/bot/core/__pycache__/scheduler.cpython-312.pyc and /dev/null differ diff --git a/bot/db/__pycache__/models.cpython-312.pyc b/bot/db/__pycache__/models.cpython-312.pyc deleted file mode 100644 index 6834c04..0000000 Binary files a/bot/db/__pycache__/models.cpython-312.pyc and /dev/null differ diff --git a/bot/db/__pycache__/operations.cpython-312.pyc b/bot/db/__pycache__/operations.cpython-312.pyc deleted file mode 100644 index e3ccf5e..0000000 Binary files a/bot/db/__pycache__/operations.cpython-312.pyc and /dev/null differ diff --git a/bot/handlers/__pycache__/__init__.cpython-312.pyc b/bot/handlers/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index df769ee..0000000 Binary files a/bot/handlers/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/bot/handlers/__pycache__/callbacks.cpython-312.pyc b/bot/handlers/__pycache__/callbacks.cpython-312.pyc deleted file mode 100644 index 2a70de5..0000000 Binary files a/bot/handlers/__pycache__/callbacks.cpython-312.pyc and /dev/null differ diff --git a/bot/handlers/__pycache__/common.cpython-312.pyc b/bot/handlers/__pycache__/common.cpython-312.pyc deleted file mode 100644 index 9c916a0..0000000 Binary files a/bot/handlers/__pycache__/common.cpython-312.pyc and /dev/null differ diff --git a/bot/handlers/__pycache__/errors.cpython-312.pyc b/bot/handlers/__pycache__/errors.cpython-312.pyc deleted file mode 100644 index 8e9d386..0000000 Binary files a/bot/handlers/__pycache__/errors.cpython-312.pyc and /dev/null differ diff --git a/bot/handlers/__pycache__/reminders_create.cpython-312.pyc b/bot/handlers/__pycache__/reminders_create.cpython-312.pyc deleted file mode 100644 index 30f51e0..0000000 Binary files a/bot/handlers/__pycache__/reminders_create.cpython-312.pyc and /dev/null differ diff --git a/bot/handlers/__pycache__/reminders_manage.cpython-312.pyc b/bot/handlers/__pycache__/reminders_manage.cpython-312.pyc deleted file mode 100644 index d9e9c00..0000000 Binary files a/bot/handlers/__pycache__/reminders_manage.cpython-312.pyc and /dev/null differ diff --git a/bot/handlers/reminders_manage.py b/bot/handlers/reminders_manage.py index 76e6d4f..78285b8 100644 --- a/bot/handlers/reminders_manage.py +++ b/bot/handlers/reminders_manage.py @@ -122,7 +122,7 @@ async def show_reminder_details( await callback.message.edit_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", ) await callback.answer() @@ -131,6 +131,7 @@ async def show_reminder_details( @router.callback_query(ReminderActionCallback.filter(F.action == "back_to_list")) async def back_to_reminders_list( callback: CallbackQuery, + callback_data: ReminderActionCallback, session: AsyncSession, ) -> None: """ @@ -153,7 +154,7 @@ async def back_to_reminders_list( await callback.message.edit_text( 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() diff --git a/bot/keyboards/__pycache__/pagination.cpython-312.pyc b/bot/keyboards/__pycache__/pagination.cpython-312.pyc deleted file mode 100644 index f983945..0000000 Binary files a/bot/keyboards/__pycache__/pagination.cpython-312.pyc and /dev/null differ diff --git a/bot/keyboards/reminders.py b/bot/keyboards/reminders.py index 177d6d8..95b341b 100644 --- a/bot/keyboards/reminders.py +++ b/bot/keyboards/reminders.py @@ -15,8 +15,9 @@ class ReminderIntervalCallback(CallbackData, prefix="interval"): class ReminderActionCallback(CallbackData, prefix="reminder"): """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 + page: int = 0 class ReminderEditCallback(CallbackData, prefix="edit"): @@ -170,7 +171,7 @@ def get_snooze_delay_keyboard(reminder_id: int) -> InlineKeyboardMarkup: 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. @@ -207,7 +208,7 @@ def get_reminder_details_keyboard(reminder_id: int, is_active: bool) -> InlineKe [ InlineKeyboardButton( 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() ), ], ] diff --git a/bot/services/__pycache__/reminders_service.cpython-312.pyc b/bot/services/__pycache__/reminders_service.cpython-312.pyc deleted file mode 100644 index 747f4a2..0000000 Binary files a/bot/services/__pycache__/reminders_service.cpython-312.pyc and /dev/null differ diff --git a/bot/services/__pycache__/time_service.cpython-312.pyc b/bot/services/__pycache__/time_service.cpython-312.pyc deleted file mode 100644 index 54d531f..0000000 Binary files a/bot/services/__pycache__/time_service.cpython-312.pyc and /dev/null differ diff --git a/bot/utils/__pycache__/validators.cpython-312.pyc b/bot/utils/__pycache__/validators.cpython-312.pyc deleted file mode 100644 index 30b0c5e..0000000 Binary files a/bot/utils/__pycache__/validators.cpython-312.pyc and /dev/null differ