Fixed event preview click and dark mode display

This commit is contained in:
Arnaud Vergnet 2020-04-10 00:09:25 +02:00
parent f282a1dd84
commit 4f80cadfed
3 changed files with 12 additions and 12 deletions

View file

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

View file

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

View file

@ -83,7 +83,7 @@ class HomeScreen extends React.Component<Props> {
if (this.props.route.params.nextScreen !== undefined && this.props.route.params.nextScreen !== null) {
this.props.navigation.navigate(this.props.route.params.nextScreen, this.props.route.params.data);
// reset params to prevent infinite loop
this.props.navigation.dispatch(CommonActions.setParams({ nextScreen: null }));
this.props.navigation.dispatch(CommonActions.setParams({nextScreen: null}));
}
}
};
@ -137,7 +137,7 @@ class HomeScreen extends React.Component<Props> {
id: SECTIONS_ID[1]
}
];
}
};
/**
* 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> {
let displayEvent = this.getDisplayEvent(futureEvents);
const clickContainerAction = () => this.props.navigation.navigate('planning');
const clickPreviewAction = () => this.props.navigation.navigate('planning-information', {data: displayEvent});
const clickPreviewAction = () => this.props.navigation.navigate('home-planning-information', {data: displayEvent});
return (
<DashboardItem