From 0175690a2b04b4ef4a226a3482b5e612ce41150d Mon Sep 17 00:00:00 2001 From: paweldomas Date: Tue, 12 Mar 2019 16:39:25 -0500 Subject: [PATCH] ref(mobile): display only the topmost notification Only one notification will be displayed at a time on mobile. --- .../NotificationsContainer.native.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/react/features/notifications/components/NotificationsContainer.native.js b/react/features/notifications/components/NotificationsContainer.native.js index a8326d11e..702cd2486 100644 --- a/react/features/notifications/components/NotificationsContainer.native.js +++ b/react/features/notifications/components/NotificationsContainer.native.js @@ -37,7 +37,11 @@ class NotificationsContainer render() { const { _notifications } = this.props; - if (!_notifications || !_notifications.length) { + // Currently the native container displays only the topmost notification + const theNotification + = _notifications && _notifications.length && _notifications[0]; + + if (!theNotification) { return null; } @@ -48,15 +52,10 @@ class NotificationsContainer styles.notificationContainer, this.props.style ] } > - { - _notifications.map( - ({ props, uid }) => ( - )) - } + ); }