ソースを参照

fix(notifications) remove unused isDismissAllowed prop

master
Saúl Ibarra Corretgé 3年前
コミット
01bd18b86a

+ 1
- 7
react/features/notifications/components/AbstractNotification.js ファイルの表示

@@ -61,11 +61,6 @@ export type Props = {
61 61
      */
62 62
     icon?: String,
63 63
 
64
-    /**
65
-     * Whether or not the dismiss button should be displayed.
66
-     */
67
-    isDismissAllowed: boolean,
68
-
69 64
     /**
70 65
      * Maximum lines of the description.
71 66
      */
@@ -116,8 +111,7 @@ export default class AbstractNotification<P: Props> extends Component<P> {
116 111
      * @static
117 112
      */
118 113
     static defaultProps = {
119
-        appearance: NOTIFICATION_TYPE.NORMAL,
120
-        isDismissAllowed: true
114
+        appearance: NOTIFICATION_TYPE.NORMAL
121 115
     };
122 116
 
123 117
     /**

+ 5
- 10
react/features/notifications/components/native/Notification.js ファイルの表示

@@ -32,8 +32,6 @@ class Notification extends AbstractNotification<Props> {
32 32
      * @returns {ReactElement}
33 33
      */
34 34
     render() {
35
-        const { isDismissAllowed } = this.props;
36
-
37 35
         return (
38 36
             <View
39 37
                 pointerEvents = 'box-none'
@@ -47,14 +45,11 @@ class Notification extends AbstractNotification<Props> {
47 45
                         }
48 46
                     </View>
49 47
                 </View>
50
-                {
51
-                    isDismissAllowed
52
-                    && <TouchableOpacity onPress = { this._onDismissed }>
53
-                        <Icon
54
-                            src = { IconClose }
55
-                            style = { styles.dismissIcon } />
56
-                    </TouchableOpacity>
57
-                }
48
+                <TouchableOpacity onPress = { this._onDismissed }>
49
+                    <Icon
50
+                        src = { IconClose }
51
+                        style = { styles.dismissIcon } />
52
+                </TouchableOpacity>
58 53
             </View>
59 54
         );
60 55
     }

読み込み中…
キャンセル
保存