-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for multiple SwiftEntryKit instances working in parallel #366
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must Support for multiple SwiftEntryKit instances working in parallel
The current state of the PR does support multiple SwiftEntryKit instances working in parallel. This is actually visible on the attached gif, where one instance is showing an ActionSheet and one showing a Toast. Could you please specify the changes you would require? |
version: 2.0.0 |
It would be great if this could be merged into SwiftEntryKit. I have seen no issues using this code and it has been very useful. Though going by the lack of activity to SwiftEntryKit, it seems as though this project may be abandoned (which would be a shame). |
Issue Link 🔗
No issue.
Goals 🥅
Support for multiple SwiftEntryKit instances working in parallel. No API breaking changes!
These changes allow the programmer to create separate instances and use them at the same time.
For example: an alert and a toast can be shown at the same time, as long as they are displayed by different SwiftEntryKit instances, and their windowLevel differs.
Implementation Details ✏️
SwiftEntryKit initializer made public.
Move logic from SwiftEntryKit class functions to instance functions.
SwiftEntryKit class functions now call a their instance counterpart on a new
public static let shared: SwiftEntryKit
instance.Eliminated static references between EKWindowProvider and lower level components, for consistent behaviour.
Testing Details 🔍
Create 2 SwiftEntryKit instances.
For example:
Call display on them at the same time (make sure the given EKAttributes have windowLevel property, toast is logical to have higher)
Observe the alert and toast showing up at the same time.
Screenshot Links 📷