Closed sascha-wolf closed 8 years ago
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.
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.