react-native-push-notification-popup icon indicating copy to clipboard operation
react-native-push-notification-popup copied to clipboard

Display multiple popups?

Open Strate opened this issue 7 years ago • 7 comments

Hey! Just found this awesome library, thank you for this!

Is there any way to display more than 1 notification popup?

Strate avatar Oct 03 '18 10:10 Strate

Thank you @Strate !

What do you mean by displaying more than 1 popup?

Currently if you .show() while there is still a popup displaying, the current one will be discarded immediately.

Do you want multiple popups to be stacked onto a single one, or just one-by-one filling up the screen?

carsonwah avatar Oct 03 '18 13:10 carsonwah

@carsonwah I want to display, for example, maximum 3 notifications, and next notification should hide oldest one.

Strate avatar Oct 03 '18 14:10 Strate

So, you dispatch 3 notifications. It goes like:

show 1st -> few seconds -> hide 1st, show 2nd -> few seconds -> hide 2nd, show 3rd -> ...

Something like this?

carsonwah avatar Oct 03 '18 16:10 carsonwah

show 1st - visible list: [1st] show 2nd -> visible list: [2nd, 1st] show 3rd -> visible list: [3rd, 2nd, 1st] show 4th -> visible list: [4th, 3rd, 2nd] (1st hidden on that case)

And all of them hides after some duration

Strate avatar Oct 04 '18 07:10 Strate

I see. Interesting. This is not a standard push notification approach on native platforms.

The hardest part of this i guess would be handling the gestures from user.

I will take it into consideration. Meanwhile, if you can help on this, you may open a pull request. Thanks a lot.

carsonwah avatar Oct 04 '18 11:10 carsonwah

@carsonwah is there any way of implementing this while disabling the gesture?

ManigandanRaamanathan avatar May 27 '19 02:05 ManigandanRaamanathan

@ManigandanRaamanathan Should be possible. Better to write a new component for this and let user choose. (though I think disabling the gesture will be a bit weird)

Any PR is welcome.

carsonwah avatar Jun 15 '19 12:06 carsonwah