-
Notifications
You must be signed in to change notification settings - Fork 102
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
Provide modal parameter to showSimpleNotification #5
Comments
thanks for your suggestion. I have considered it for a long time, there could be two way to reach that goal.
|
Yes - you are right on both accounts. FYI, I have created my own popups (modal/non modal) using the first approach - i.e via showDialog. If the overlay_support package is extended to use showDialog when modal=true is supplied to showSimpleNotification then the functionality & implementation of a modal notification will be transparent. Developers using this package will not need to do anything special. Additionally, add the modal=true as an optional parameter which defaults to false - this way the API will not be broken and any existing users will get the same functionality they are currently getting. Attached gif shows an example of a popup dialog that displays when a user is logging in to app. Its modal thus preventing further taps and centered - when the log in process completes , the main app will load. |
yes, add but I think that is not good to prevent other notification.
I have considered add a optional parameter name with |
in addition, i have wrote a method to achieved a similar effect in the past. |
The KEY approach would work and thus the implementation of showSimpleNotification should reject all future invocations that have the same invocation key while it is still RUNNING, i.e it should not be reentrant when the same key is supplied during the showSimpleNotification duration period. Once the duration period is over, showSimpleNotification can be invoked again with the same key Yes this works and is good : my suggestion for showSimpleNotification was just to make the package much better as I think in its current form it is Great but could be Greater |
Currently, in its simplest form - the quickest way to show a notification at the top of the screen is via showSimpleNotification. Without resorting to writing custom notification overlay, can we extend the showSimpleNotification to include an optional parameter
This way - if Notifications are tied to (say) button taps - then repeated Notifications will not be shown because the first Notification at the top of the screen being MODAL will prevent this.
The text was updated successfully, but these errors were encountered: