Преглед изворни кода

fix: render notification description on mobile

master
Bettenbuk Zoltan пре 5 година
родитељ
комит
a2cbd9229a
1 измењених фајлова са 11 додато и 10 уклоњено
  1. 11
    10
      react/features/notifications/components/native/Notification.js

+ 11
- 10
react/features/notifications/components/native/Notification.js Прегледај датотеку

64
     _renderContent() {
64
     _renderContent() {
65
         const { t, title, titleArguments, titleKey } = this.props;
65
         const { t, title, titleArguments, titleKey } = this.props;
66
         const titleText = title || (titleKey && t(titleKey, titleArguments));
66
         const titleText = title || (titleKey && t(titleKey, titleArguments));
67
+        const description = this._getDescription();
67
 
68
 
68
-        if (titleText) {
69
-            return (
69
+        if (description && description.length) {
70
+            return description.map((line, index) => (
70
                 <Text
71
                 <Text
72
+                    key = { index }
71
                     numberOfLines = { 1 }
73
                     numberOfLines = { 1 }
72
-                    style = { styles.contentText } >
73
-                    { titleText }
74
+                    style = { styles.contentText }>
75
+                    { line }
74
                 </Text>
76
                 </Text>
75
-            );
77
+            ));
76
         }
78
         }
77
 
79
 
78
-        return this._getDescription().map((line, index) => (
80
+        return (
79
             <Text
81
             <Text
80
-                key = { index }
81
                 numberOfLines = { 1 }
82
                 numberOfLines = { 1 }
82
-                style = { styles.contentText }>
83
-                { line }
83
+                style = { styles.contentText } >
84
+                { titleText }
84
             </Text>
85
             </Text>
85
-        ));
86
+        );
86
     }
87
     }
87
 
88
 
88
     _getDescription: () => Array<string>;
89
     _getDescription: () => Array<string>;

Loading…
Откажи
Сачувај