static let hoverEvent: Event = Event(id: "hoverEvent")
/// Parameters-Rules
@Parameter
static var isHovering: Bool = false
static var tipCountKey = "UserTipCount"
var title: Text
var message: Text?
var image: Image?
var tipShownLimit: Int
@ObservedObject var buttonState: ButtonState
var rules: [Rule] {
#Rule(Self.hoverEvent) {
$0.donations.count < tipShownLimit
}
}
}
error: Event Rules require a count comparison. If I replace tipShownLimit like this: var rules: [Rule] { #Rule(Self.hoverEvent) { $0.donations.count < 3 } }
it compiles fine. the error is: Event Rules require a count comparison.