forked from vergnet/application-amicale
Fixed event preview click and dark mode display
This commit is contained in:
parent
f282a1dd84
commit
4f80cadfed
3 changed files with 12 additions and 12 deletions
|
@ -32,7 +32,7 @@ class CustomHTML extends React.Component<Props> {
|
||||||
// Completely recreate the component on theme change to force theme reload
|
// Completely recreate the component on theme change to force theme reload
|
||||||
if (this.props.theme.dark)
|
if (this.props.theme.dark)
|
||||||
return (
|
return (
|
||||||
<View style={{flex: 1}}>
|
<View>
|
||||||
{this.getHTML()}
|
{this.getHTML()}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,7 +13,7 @@ import CustomHTML from "../Custom/CustomHTML";
|
||||||
* @param props Props to pass to the component
|
* @param props Props to pass to the component
|
||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
function PreviewEventDashboardItem(props) {
|
function PreviewEventDashboardItem(props : Object) {
|
||||||
const isEmpty = props.event === undefined
|
const isEmpty = props.event === undefined
|
||||||
? true
|
? true
|
||||||
: isDescriptionEmpty(props.event['description']);
|
: isDescriptionEmpty(props.event['description']);
|
||||||
|
|
|
@ -83,7 +83,7 @@ class HomeScreen extends React.Component<Props> {
|
||||||
if (this.props.route.params.nextScreen !== undefined && this.props.route.params.nextScreen !== null) {
|
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);
|
this.props.navigation.navigate(this.props.route.params.nextScreen, this.props.route.params.data);
|
||||||
// reset params to prevent infinite loop
|
// 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]
|
id: SECTIONS_ID[1]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates the dataset associated to the dashboard to be displayed in the FlatList as a section
|
* 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);
|
let displayEvent = this.getDisplayEvent(futureEvents);
|
||||||
const clickContainerAction = () => this.props.navigation.navigate('planning');
|
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 (
|
return (
|
||||||
<DashboardItem
|
<DashboardItem
|
||||||
|
@ -469,13 +469,13 @@ class HomeScreen extends React.Component<Props> {
|
||||||
const nav = this.props.navigation;
|
const nav = this.props.navigation;
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<WebSectionList
|
<WebSectionList
|
||||||
createDataset={this.createDataset}
|
createDataset={this.createDataset}
|
||||||
navigation={nav}
|
navigation={nav}
|
||||||
autoRefreshTime={REFRESH_TIME}
|
autoRefreshTime={REFRESH_TIME}
|
||||||
refreshOnFocus={true}
|
refreshOnFocus={true}
|
||||||
fetchUrl={DATA_URL}
|
fetchUrl={DATA_URL}
|
||||||
renderItem={this.getRenderItem}/>
|
renderItem={this.getRenderItem}/>
|
||||||
<FAB
|
<FAB
|
||||||
style={styles.fab}
|
style={styles.fab}
|
||||||
icon="qrcode-scan"
|
icon="qrcode-scan"
|
||||||
|
|
Loading…
Reference in a new issue