Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShowMode in manager.start() doesn't work as expected by some users #358

Closed
KOT4N opened this issue Jan 28, 2024 · 2 comments · Fixed by #368
Closed

ShowMode in manager.start() doesn't work as expected by some users #358

KOT4N opened this issue Jan 28, 2024 · 2 comments · Fixed by #368
Labels
documentation Improvements or additions to documentation

Comments

@KOT4N
Copy link

KOT4N commented Jan 28, 2024

MRE: https://github.com/Tishka17/aiogram_dialog/blob/develop/example/input_media_group.py

If you set ShowMode.EDIT in start() - message don't be edited:

async def start(message: Message, dialog_manager: DialogManager):
    await dialog_manager.start(Medias.start, mode=StartMode.RESET_STACK, show_mode=ShowMode.EDIT)

If you set show mode by dialog_manager.show_mode = ShowMode.EDIT - message will be edited:

async def on_input_photo(message: Message, widget: MessageInput,
                         dialog_manager: DialogManager):
    dialog_manager.show_mode = ShowMode.EDIT
    dialog_manager.dialog_data.setdefault("photos", []).append(
        (message.photo[-1].file_id, message.photo[-1].file_unique_id),
    )
@KOT4N
Copy link
Author

KOT4N commented Feb 3, 2024

note: now i know that showmode works only on request.

@Tishka17 Tishka17 added the documentation Improvements or additions to documentation label Feb 5, 2024
@Tishka17 Tishka17 changed the title ShowMode in manager.start() doesn't work ShowMode in manager.start() doesn't work as expected by some users Feb 5, 2024
@Tishka17
Copy link
Owner

Tishka17 commented Feb 5, 2024

We need to clarify this behavior in documentation: all show modes apply only for single update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants