Closed graycampbell closed 3 years ago
SwiftMessages ignores duplicates by default. So if your messages have the same ID and you haven't set SwiftMessages.Config. ignoreDuplicates = false
, then the behavior you see is expected.
The MessageView
class determined it's ID as follows:
open var id: String {
get {
return customId ?? "MessageView:title=\(String(describing: titleLabel?.text)), body=\(String(describing: bodyLabel?.text))"
}
set {
customId = newValue
}
}
private var customId: String?
So if you don't specify a customId
, then it is derived from the message's title and body.
I'm setting ignoresDuplicates
to false
, and I'm not using MessageView
- I'm using a custom UIView
that does not conform to Identifiable
.
Should be fixed in 8.0.3
I've created a
NotificationManager
in my project to present banners at the bottom of the screen as notifications to users. Sometimes notifications occur while a banner is already being shown, so my expectation was that callingSwiftMessages.show
would add that banner to the queue to be shown when the currently visible banner is hidden. For some reason, that isn't happening. The currently visible banner disappears as expected, but no new banner is shown. Below is myNotificationManager
. Am I missing something, or is this a bug?