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

#358 Fix not saving 'show_mode' #359

Closed
wants to merge 0 commits into from

Conversation

IvanKirpichnikov
Copy link
Contributor

Fixed:

Added:

  • New 'show_mode' attribute for 'Context'.
  • New 'show_mode' argument for 'Stack.push' of type 'Optional[ShowMode]'


from aiogram.fsm.state import State

from aiogram_dialog.api.exceptions import DialogStackOverflow
from .context import Context, Data
if TYPE_CHECKING:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, no

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, fixed it


from aiogram.fsm.state import State

if TYPE_CHECKING:
from ...api.entities import ShowMode
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look in other modules how do I import

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -15,6 +18,7 @@ class Context:
start_data: Data = field(compare=False)
dialog_data: DataDict = field(compare=False, default_factory=dict)
widget_data: DataDict = field(compare=False, default_factory=dict)
show_mode: Optional[ShowMode] = field(default=None, compare=False)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need to store show_mode between events?

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

Successfully merging this pull request may close these issues.

2 participants