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