Improved planning display screen and fixed crash when no event on home
This commit is contained in:
parent
f171578c8d
commit
7def165547
2 changed files with 12 additions and 1 deletions
|
@ -310,7 +310,12 @@ export default class HomeScreen extends FetchedDataSectionList {
|
|||
</Text>;
|
||||
} else
|
||||
subtitle = i18n.t('homeScreen.dashboard.todayEventsSubtitleNA');
|
||||
let clickAction = () => this.props.navigation.navigate('PlanningDisplayScreen', {data: displayEvent});
|
||||
let clickAction = () => {
|
||||
if (isAvailable)
|
||||
this.props.navigation.navigate('PlanningDisplayScreen', {data: displayEvent});
|
||||
else
|
||||
this.props.navigation.navigate('PlanningScreen');
|
||||
};
|
||||
|
||||
let displayEvent = this.getDisplayEvent(futureEvents);
|
||||
|
||||
|
|
|
@ -37,6 +37,12 @@ export default class PlanningDisplayScreen extends React.Component<Props> {
|
|||
<H1>
|
||||
{displayData.title}
|
||||
</H1>
|
||||
<H3 style={{
|
||||
marginTop: 10,
|
||||
color: ThemeManager.getCurrentThemeVariables().listNoteColor
|
||||
}}>
|
||||
{PlanningEventManager.getFormattedTime(displayData)}
|
||||
</H3>
|
||||
{displayData.logo !== null ?
|
||||
<View style={{width: '100%', height: 300, marginTop: 20, marginBottom: 20}}>
|
||||
<Image style={{flex: 1, resizeMode: "contain"}}
|
||||
|
|
Loading…
Reference in a new issue