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,7 +310,12 @@ export default class HomeScreen extends FetchedDataSectionList {
310 310
                 </Text>;
311 311
         } else
312 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 320
         let displayEvent = this.getDisplayEvent(futureEvents);
316 321
 

+ 6
- 0
screens/PlanningDisplayScreen.js View File

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

Loading…
Cancel
Save