forked from vergnet/application-amicale
Fixed proxiwash screen not firing componentDidMount
This commit is contained in:
parent
2b21b00ec8
commit
cf8014da3f
2 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,7 @@ export default class FetchedDataSectionList extends React.Component<Props, State
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Refresh the FetchedData on first screen load
|
* Register react navigation events on first screen load
|
||||||
*/
|
*/
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.willFocusSubscription = this.props.navigation.addListener(
|
this.willFocusSubscription = this.props.navigation.addListener(
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList {
|
||||||
* Creates machine state parameters using current theme and translations
|
* Creates machine state parameters using current theme and translations
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor() {
|
||||||
super(DATA_URL, 1000 * 60); // Refresh every minute
|
super(DATA_URL, 1000 * 10); // Refresh every minute
|
||||||
let colors = ThemeManager.getCurrentThemeVariables();
|
let colors = ThemeManager.getCurrentThemeVariables();
|
||||||
stateColors[MACHINE_STATES.TERMINE] = colors.proxiwashFinishedColor;
|
stateColors[MACHINE_STATES.TERMINE] = colors.proxiwashFinishedColor;
|
||||||
stateColors[MACHINE_STATES.DISPONIBLE] = colors.proxiwashReadyColor;
|
stateColors[MACHINE_STATES.DISPONIBLE] = colors.proxiwashReadyColor;
|
||||||
|
@ -78,6 +78,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
super.componentDidMount();
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
Expo.Notifications.createChannelAndroidAsync('reminders', {
|
Expo.Notifications.createChannelAndroidAsync('reminders', {
|
||||||
name: 'Reminders',
|
name: 'Reminders',
|
||||||
|
|
Loading…
Reference in a new issue