You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I call bulletinManager.dismissBulletin(animated: true) when the bulletin has already been dismissed, it crashes saying BLTNItemManager must only be used from the main thread. If the dismissBulletin() function is called immediately after the manager has been dismissed, bulletinManager.isShowingBulletin is still true. There needs to be a check like "if the manager is no longer presenting, or is in the middle of dismissing, ignore the call to dismiss".
I'm using the latest version of BulletinBoard
The text was updated successfully, but these errors were encountered:
yusuftor
changed the title
Calling dismissBulletin causes crashes
Calling dismissBulletin whilst bulletin is dismissing causes crash
Feb 25, 2019
Also facing same issue. I believe the crash actually happens in assertIsPrepared() because we've already ensured that all dismiss calls occur on the main thread. And for testing I could reproduce it by executing 2 dismiss calls in a row.
I'm using the following solution:
add system("sed -i '' -e 's/fileprivate var isPrepared/public fileprivate(set) var isPrepared/' Pods/BulletinBoard/Sources/BLTNItemManager.swift") to post_install hook in the Podfile
before calling dismiss, check that manager.isPrepared == true
If I call
bulletinManager.dismissBulletin(animated: true)
when the bulletin has already been dismissed, it crashes sayingBLTNItemManager must only be used from the main thread.
If thedismissBulletin()
function is called immediately after the manager has been dismissed,bulletinManager.isShowingBulletin
is stilltrue
. There needs to be a check like "if the manager is no longer presenting, or is in the middle of dismissing, ignore the call to dismiss".I'm using the latest version of BulletinBoard
The text was updated successfully, but these errors were encountered: