Expo Push Notification has the _displayInForeground
property that can be set to allow receiving push notifications when the app in the foreground. Currently, I have the notification listener activated upon mounting the home screen, which is the very first screen.
Is there a way to either turn off the listener or toggle the _displayInForeground
only when the user is in the chat screen? I don't want the push notifications for the chat messages coming in while the user is on the chat screen.