Browse Source

Fixed event preview click and dark mode display

Arnaud Vergnet 4 years ago
parent
commit
4f80cadfed

+ 1
- 1
src/components/Custom/CustomHTML.js View File

@@ -32,7 +32,7 @@ class CustomHTML extends React.Component<Props> {
32 32
         // Completely recreate the component on theme change to force theme reload
33 33
         if (this.props.theme.dark)
34 34
             return (
35
-                <View style={{flex: 1}}>
35
+                <View>
36 36
                     {this.getHTML()}
37 37
                 </View>
38 38
             );

+ 1
- 1
src/components/Home/PreviewEventDashboardItem.js View File

@@ -13,7 +13,7 @@ import CustomHTML from "../Custom/CustomHTML";
13 13
  * @param props Props to pass to the component
14 14
  * @return {*}
15 15
  */
16
-function PreviewEventDashboardItem(props) {
16
+function PreviewEventDashboardItem(props : Object) {
17 17
     const isEmpty = props.event === undefined
18 18
         ? true
19 19
         : isDescriptionEmpty(props.event['description']);

+ 10
- 10
src/screens/HomeScreen.js View File

@@ -83,7 +83,7 @@ class HomeScreen extends React.Component<Props> {
83 83
             if (this.props.route.params.nextScreen !== undefined && this.props.route.params.nextScreen !== null) {
84 84
                 this.props.navigation.navigate(this.props.route.params.nextScreen, this.props.route.params.data);
85 85
                 // reset params to prevent infinite loop
86
-                this.props.navigation.dispatch(CommonActions.setParams({ nextScreen: null }));
86
+                this.props.navigation.dispatch(CommonActions.setParams({nextScreen: null}));
87 87
             }
88 88
         }
89 89
     };
@@ -137,7 +137,7 @@ class HomeScreen extends React.Component<Props> {
137 137
                 id: SECTIONS_ID[1]
138 138
             }
139 139
         ];
140
-    }
140
+    };
141 141
 
142 142
     /**
143 143
      * Generates the dataset associated to the dashboard to be displayed in the FlatList as a section
@@ -349,7 +349,7 @@ class HomeScreen extends React.Component<Props> {
349 349
 
350 350
         let displayEvent = this.getDisplayEvent(futureEvents);
351 351
         const clickContainerAction = () => this.props.navigation.navigate('planning');
352
-        const clickPreviewAction = () => this.props.navigation.navigate('planning-information', {data: displayEvent});
352
+        const clickPreviewAction = () => this.props.navigation.navigate('home-planning-information', {data: displayEvent});
353 353
 
354 354
         return (
355 355
             <DashboardItem
@@ -469,13 +469,13 @@ class HomeScreen extends React.Component<Props> {
469 469
         const nav = this.props.navigation;
470 470
         return (
471 471
             <View>
472
-            <WebSectionList
473
-                createDataset={this.createDataset}
474
-                navigation={nav}
475
-                autoRefreshTime={REFRESH_TIME}
476
-                refreshOnFocus={true}
477
-                fetchUrl={DATA_URL}
478
-                renderItem={this.getRenderItem}/>
472
+                <WebSectionList
473
+                    createDataset={this.createDataset}
474
+                    navigation={nav}
475
+                    autoRefreshTime={REFRESH_TIME}
476
+                    refreshOnFocus={true}
477
+                    fetchUrl={DATA_URL}
478
+                    renderItem={this.getRenderItem}/>
479 479
                 <FAB
480 480
                     style={styles.fab}
481 481
                     icon="qrcode-scan"

Loading…
Cancel
Save