Skip to content

Commit a0dc920

Browse files
committed
Added the ability to go back from viewing your profile
1 parent 7a390b8 commit a0dc920

File tree

15 files changed

+46
-31
lines changed

15 files changed

+46
-31
lines changed

app/handlers/dating/profile.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from aiogram import F, types
22
from aiogram.filters.state import StateFilter
33

4-
from app.handlers.bot_utils import send_profile
4+
from app.handlers.bot_utils import menu, send_profile
55
from app.handlers.message_text import user_message_text as umt
66
from app.keyboards.default.base import profile_kb
77
from app.routers import dating_router
@@ -13,3 +13,8 @@ async def profile_command(message: types.Message, user: UserModel) -> None:
1313
"""Отправляет профиль пользователя"""
1414
await send_profile(message.from_user.id, user.profile)
1515
await message.answer(umt.PROFILE_MENU, reply_markup=profile_kb)
16+
17+
18+
@dating_router.message(StateFilter(None), F.text == "↩️")
19+
async def _return_to_menu(message: types.Message) -> None:
20+
await menu(message.from_user.id)

app/handlers/message_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def PROFILE_MENU(self):
3434
✍️ Изменить описание
3535
❌ Отключить анкету
3636
37-
🔍 Смотреть анкеты
37+
↩️ Вернутся назад
3838
""")
3939

4040
@property

app/keyboards/default/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
profile_kb: ReplyKeyboardMarkup = kb_gen(
1717
["🔄", "🖼", "✍️", "❌"],
18-
["🔍"],
18+
["↩️"],
1919
)
2020

2121
menu_kb: ReplyKeyboardMarkup = kb_gen(

data/locales/bot.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: bot VERSION\n"
1010
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11-
"POT-Creation-Date: 2025-05-22 13:54+0300\n"
11+
"POT-Creation-Date: 2025-05-22 14:35+0300\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -46,7 +46,7 @@ msgid ""
4646
"✍️ Изменить описание\n"
4747
"❌ Отключить анкету\n"
4848
"\n"
49-
"🔍 Смотреть анкеты\n"
49+
"↩️ Вернутся назад\n"
5050
msgstr ""
5151

5252
#: app/handlers/message_text.py:42

data/locales/en/LC_MESSAGES/bot.mo

-3 Bytes
Binary file not shown.

data/locales/en/LC_MESSAGES/bot.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: bot VERSION\n"
99
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10-
"POT-Creation-Date: 2025-05-22 13:54+0300\n"
11-
"PO-Revision-Date: 2025-05-22 14:11+0300\n"
10+
"POT-Creation-Date: 2025-05-22 14:35+0300\n"
11+
"PO-Revision-Date: 2025-05-22 14:40+0300\n"
1212
"Last-Translator: \n"
1313
"Language-Team: en <[email protected]>\n"
1414
"Language: en\n"
@@ -61,15 +61,15 @@ msgid ""
6161
"✍️ Изменить описание\n"
6262
"❌ Отключить анкету\n"
6363
"\n"
64-
"🔍 Смотреть анкеты\n"
64+
"↩️ Вернутся назад\n"
6565
msgstr ""
6666
"\n"
6767
"🔄 Edit profile\n"
6868
"🖼 Change photo\n"
6969
"✍️ Change description\n"
7070
"❌ Deactivate profile\n"
7171
"\n"
72-
"🔍 View profiles\n"
72+
"↩️ Go back\n"
7373

7474
#: app/handlers/message_text.py:42
7575
msgid "Неизвестная команда. Если заблудился, напиши /start."
@@ -251,7 +251,7 @@ msgid ""
251251
"↩️ Вернутся назад\n"
252252
msgstr ""
253253
"\n"
254-
"\vSpecify the reason for the complaint:\n"
254+
"\\vSpecify the reason for the complaint:\n"
255255
"🔞 Indecent material\n"
256256
"💰 Advertising\n"
257257
"🔫 Other\n"

data/locales/es/LC_MESSAGES/bot.mo

-2 Bytes
Binary file not shown.

data/locales/es/LC_MESSAGES/bot.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: bot VERSION\n"
99
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10-
"POT-Creation-Date: 2025-05-22 13:54+0300\n"
11-
"PO-Revision-Date: 2025-05-22 14:10+0300\n"
10+
"POT-Creation-Date: 2025-05-22 14:35+0300\n"
11+
"PO-Revision-Date: 2025-05-22 14:38+0300\n"
1212
"Last-Translator: \n"
1313
"Language-Team: es <[email protected]>\n"
1414
"Language: es\n"
@@ -61,15 +61,15 @@ msgid ""
6161
"✍️ Изменить описание\n"
6262
"❌ Отключить анкету\n"
6363
"\n"
64-
"🔍 Смотреть анкеты\n"
64+
"↩️ Вернутся назад\n"
6565
msgstr ""
6666
"\n"
6767
"🔄 Rellenar de nuevo el formulario\n"
6868
"🖼 Cambiar foto\n"
6969
"✍️ Cambiar la descripción\n"
7070
"❌ Desactivar perfil\n"
7171
"\n"
72-
"🔍 Ver perfiles\n"
72+
"↩️Volveré\n"
7373

7474
#: app/handlers/message_text.py:42
7575
msgid "Неизвестная команда. Если заблудился, напиши /start."
@@ -255,7 +255,7 @@ msgid ""
255255
"↩️ Вернутся назад\n"
256256
msgstr ""
257257
"\n"
258-
"\vPor favor indique el motivo de la reclamación:\n"
258+
"\\vPor favor indique el motivo de la reclamación:\n"
259259
"🔞 Material indecente\n"
260260
"💰 Publicidad\n"
261261
"🔫 Otros\n"

data/locales/fr/LC_MESSAGES/bot.mo

2 Bytes
Binary file not shown.

data/locales/fr/LC_MESSAGES/bot.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: bot VERSION\n"
99
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10-
"POT-Creation-Date: 2025-05-22 13:54+0300\n"
11-
"PO-Revision-Date: 2025-05-22 14:09+0300\n"
10+
"POT-Creation-Date: 2025-05-22 14:35+0300\n"
11+
"PO-Revision-Date: 2025-05-22 14:38+0300\n"
1212
"Last-Translator: \n"
1313
"Language-Team: fr <[email protected]>\n"
1414
"Language: fr\n"
@@ -61,15 +61,15 @@ msgid ""
6161
"✍️ Изменить описание\n"
6262
"❌ Отключить анкету\n"
6363
"\n"
64-
"🔍 Смотреть анкеты\n"
64+
"↩️ Вернутся назад\n"
6565
msgstr ""
6666
"\n"
6767
"🔄 Remplir à nouveau le formulaire\n"
6868
"🖼 Modifier la photo\n"
6969
"✍️ Modifier la description\n"
7070
"❌ Désactiver le profil\n"
7171
"\n"
72-
"🔍 Voir les profils\n"
72+
"↩️ J'y retournerai\n"
7373

7474
#: app/handlers/message_text.py:42
7575
msgid "Неизвестная команда. Если заблудился, напиши /start."
@@ -257,7 +257,7 @@ msgid ""
257257
"↩️ Вернутся назад\n"
258258
msgstr ""
259259
"\n"
260-
"\vVeuillez indiquer le motif de la réclamation :\n"
260+
"\\vVeuillez indiquer le motif de la réclamation :\n"
261261
"🔞 Matériel indécent\n"
262262
"💰 Publicité\n"
263263
"🔫 Autre\n"

0 commit comments

Comments
 (0)