fix: render notification description on mobile
This commit is contained in:
parent
bf50a110c7
commit
a2cbd9229a
|
@ -64,25 +64,26 @@ class Notification extends AbstractNotification<Props> {
|
||||||
_renderContent() {
|
_renderContent() {
|
||||||
const { t, title, titleArguments, titleKey } = this.props;
|
const { t, title, titleArguments, titleKey } = this.props;
|
||||||
const titleText = title || (titleKey && t(titleKey, titleArguments));
|
const titleText = title || (titleKey && t(titleKey, titleArguments));
|
||||||
|
const description = this._getDescription();
|
||||||
|
|
||||||
if (titleText) {
|
if (description && description.length) {
|
||||||
return (
|
return description.map((line, index) => (
|
||||||
<Text
|
<Text
|
||||||
|
key = { index }
|
||||||
numberOfLines = { 1 }
|
numberOfLines = { 1 }
|
||||||
style = { styles.contentText } >
|
style = { styles.contentText }>
|
||||||
{ titleText }
|
{ line }
|
||||||
</Text>
|
</Text>
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._getDescription().map((line, index) => (
|
return (
|
||||||
<Text
|
<Text
|
||||||
key = { index }
|
|
||||||
numberOfLines = { 1 }
|
numberOfLines = { 1 }
|
||||||
style = { styles.contentText }>
|
style = { styles.contentText } >
|
||||||
{ line }
|
{ titleText }
|
||||||
</Text>
|
</Text>
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_getDescription: () => Array<string>;
|
_getDescription: () => Array<string>;
|
||||||
|
|
Loading…
Reference in New Issue