lucasferreira / react-native-flash-message

React Native flashbar and top notification alert utility
MIT License
1.4k stars 154 forks source link

FEATURE REQUEST: Persistent FlashMessage #253

Open frozencap opened 1 year ago

frozencap commented 1 year ago

Great lib.

autoHide: false | true both still allow the user to dismiss FlashMessage.

It would be great if we could also prevent the user from dismissing FlashMessage.

Is this doable with the current API?

frozencap commented 1 year ago

Temp hack:

const recurShow = () =>
  showMessage({
    ...
    onHide: () => recurShow(),
  });
recurShow();
lucasferreira commented 1 year ago

Hi @shawarmaz,

I this case how user could dismiss the message? It will be always fixed at the top of the app? The only way to close will be if programmatically hide then?

frozencap commented 1 year ago

Yes, programmatically.

Use cases are: Network Disconnected, Active Voice/Video Call, Recording Voice Memo, Tracking Location, and many more related to state rather than notifications

Opens up a whole slew of possibilities, making it no longer just a toast/message, but an "in-app status-bar".

Would be feature complete if it could push the entire app down as well, rather than zindexing over the app, a-la-Whatsapp, Discord, iOS Voice memos, Uber Driver, etc

PivaRos commented 1 year ago

[shawarmaz] here you go, happy to help (: