Daltron / NotificationBanner

The easiest way to display highly customizable in app notification banners in iOS
MIT License
4.75k stars 660 forks source link

NotificationBannerQueue needs to depend on a protocol (Liskov principle) #402

Open Nikoloutsos opened 1 year ago

Nikoloutsos commented 1 year ago

I want to replace the NotificationBannerQueue with my own NotificationBannerPriorityQueue. But since the method declarations depend on this specific type NotificationBannerQueue I am unable of do it.

public func show(
        queuePosition: QueuePosition = .back,
        bannerPosition: BannerPosition = .top,
-       queue: NotificationBannerQueue = NotificationBannerQueue.default,
+       queue: AnyNotificationBannerQueue = NotificationBannerQueue.default,

    )

I am willing to open a PR for fixing this. What is your opinion on this?