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

Bugfix: Messages created from a message callback won't appear #86

Merged

Conversation

sascha-wolf
Copy link
Contributor

This happened due to the fact that selecting a message will set the "messageVisible" boolean property to NO before calling the callback. When a new message get's presented, this message will be instantly shown, due to the "messageVisible" property being NO. If no further message
is queued, the messageWindow will be set to nil and the callback message never shows up.

This can be fixed by setting "messageVisible" to NO after calling the callback, to avoid that the message will be shown instantly and instead remains in the queue.

…om the callback of a message wouldn't show up

This happened due to the fact that selecting a message will set the "messageVisible" boolean property to NO before calling the callback.
When a new message get's presented, this message will be instantly shown, due to the "messageVisible" property being NO. If no further message
is queued in the messageWindow will be set to nil and the callback message never shows up.

This can be fixed by setting "messageVisible" to NO after calling the callback, to avoid that the message will be shown instantly and instead remains in the queue.
@sascha-wolf
Copy link
Contributor Author

The behavior can be replicated with this small code snippet:

[[TWMessageBarManager sharedInstance] showMessageWithTitle:@"Test" description:@"Test" type:TWMessageBarMessageTypeInfo callback:^{
    [[TWMessageBarManager sharedInstance] showMessageWithTitle:@"Inner Test" description:@"Inner Test" type:TWMessageBarMessageTypeError];
}];

When selecting the first message, the inner message will never appear.

terryworona added a commit that referenced this pull request Dec 7, 2015
Bugfix: Messages created from a message callback won't appear
@terryworona terryworona merged commit 60d6bec into terryworona:master Dec 7, 2015
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.

3 participants