ref(NotificationsContainer.native): simplify
The outer container is not necessary if 'justifyContent: flex-end' is used with the absolute fill on the main container.
This commit is contained in:
parent
e2771b53bb
commit
5119f41af6
|
@ -8,6 +8,7 @@ import {
|
|||
isNarrowAspectRatio,
|
||||
makeAspectRatioAware
|
||||
} from '../../base/responsive-ui';
|
||||
import { BoxModel } from '../../base/styles';
|
||||
import { FILMSTRIP_SIZE, isFilmstripVisible } from '../../filmstrip';
|
||||
import { HANGUP_BUTTON_SIZE } from '../../toolbox';
|
||||
|
||||
|
@ -34,7 +35,7 @@ type Props = AbstractProps & {
|
|||
/**
|
||||
* The margin of the container to be kept from other components.
|
||||
*/
|
||||
const CONTAINER_MARGIN = 10;
|
||||
const CONTAINER_MARGIN = BoxModel.margin;
|
||||
|
||||
/**
|
||||
* Implements a React {@link Component} which displays notifications and handles
|
||||
|
@ -61,28 +62,24 @@ class NotificationsContainer extends AbstractNotificationsContainer<Props> {
|
|||
return (
|
||||
<View
|
||||
pointerEvents = 'box-none'
|
||||
style = { styles.notificationOverlay }>
|
||||
<View
|
||||
pointerEvents = 'box-none'
|
||||
style = { [
|
||||
styles.notificationContainer,
|
||||
this._getContainerStyle()
|
||||
] }>
|
||||
{
|
||||
_notifications.map(notification => {
|
||||
const { props, uid } = notification;
|
||||
style = { [
|
||||
styles.notificationContainer,
|
||||
this._getContainerStyle()
|
||||
] }>
|
||||
{
|
||||
_notifications.map(notification => {
|
||||
const { props, uid } = notification;
|
||||
|
||||
return (
|
||||
<Notification
|
||||
{ ...props }
|
||||
key = { uid }
|
||||
onDismissed = { this._onDismissed }
|
||||
uid = { uid } />
|
||||
return (
|
||||
<Notification
|
||||
{ ...props }
|
||||
key = { uid }
|
||||
onDismissed = { this._onDismissed }
|
||||
uid = { uid } />
|
||||
|
||||
);
|
||||
})
|
||||
}
|
||||
</View>
|
||||
);
|
||||
})
|
||||
}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -48,12 +48,9 @@ export default createStyleSheet({
|
|||
* Outermost container of a list of notifications.
|
||||
*/
|
||||
notificationContainer: {
|
||||
alignItems: 'flex-start',
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
padding: 2 * BoxModel.padding,
|
||||
position: 'absolute',
|
||||
right: 0
|
||||
...StyleSheet.absoluteFillObject,
|
||||
justifyContent: 'flex-end',
|
||||
padding: 2 * BoxModel.padding
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -64,13 +61,6 @@ export default createStyleSheet({
|
|||
paddingVertical: 0.5 * BoxModel.padding
|
||||
},
|
||||
|
||||
/**
|
||||
* A full screen overlay to help to position the container.
|
||||
*/
|
||||
notificationOverlay: {
|
||||
...StyleSheet.absoluteFillObject
|
||||
},
|
||||
|
||||
/**
|
||||
* The View containing the title.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue