Browse Source

Improved planning display screen and fixed crash when no event on home

keplyx 4 years ago
parent
commit
7def165547
2 changed files with 12 additions and 1 deletions
  1. 6
    1
      screens/HomeScreen.js
  2. 6
    0
      screens/PlanningDisplayScreen.js

+ 6
- 1
screens/HomeScreen.js View File

310
                 </Text>;
310
                 </Text>;
311
         } else
311
         } else
312
             subtitle = i18n.t('homeScreen.dashboard.todayEventsSubtitleNA');
312
             subtitle = i18n.t('homeScreen.dashboard.todayEventsSubtitleNA');
313
-        let clickAction = () => this.props.navigation.navigate('PlanningDisplayScreen', {data: displayEvent});
313
+        let clickAction = () => {
314
+            if (isAvailable)
315
+                this.props.navigation.navigate('PlanningDisplayScreen', {data: displayEvent});
316
+            else
317
+                this.props.navigation.navigate('PlanningScreen');
318
+        };
314
 
319
 
315
         let displayEvent = this.getDisplayEvent(futureEvents);
320
         let displayEvent = this.getDisplayEvent(futureEvents);
316
 
321
 

+ 6
- 0
screens/PlanningDisplayScreen.js View File

37
                     <H1>
37
                     <H1>
38
                         {displayData.title}
38
                         {displayData.title}
39
                     </H1>
39
                     </H1>
40
+                    <H3 style={{
41
+                        marginTop: 10,
42
+                        color: ThemeManager.getCurrentThemeVariables().listNoteColor
43
+                    }}>
44
+                        {PlanningEventManager.getFormattedTime(displayData)}
45
+                    </H3>
40
                     {displayData.logo !== null ?
46
                     {displayData.logo !== null ?
41
                         <View style={{width: '100%', height: 300, marginTop: 20, marginBottom: 20}}>
47
                         <View style={{width: '100%', height: 300, marginTop: 20, marginBottom: 20}}>
42
                             <Image style={{flex: 1, resizeMode: "contain"}}
48
                             <Image style={{flex: 1, resizeMode: "contain"}}

Loading…
Cancel
Save