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