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() {
|
||||
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
|
||||
*/
|
||||
constructor() {
|
||||
super(DATA_URL, 1000 * 60); // Refresh every minute
|
||||
super(DATA_URL, 1000 * 10); // Refresh every minute
|
||||
let colors = ThemeManager.getCurrentThemeVariables();
|
||||
stateColors[MACHINE_STATES.TERMINE] = colors.proxiwashFinishedColor;
|
||||
stateColors[MACHINE_STATES.DISPONIBLE] = colors.proxiwashReadyColor;
|
||||
|
@ -78,6 +78,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
super.componentDidMount();
|
||||
if (Platform.OS === 'android') {
|
||||
Expo.Notifications.createChannelAndroidAsync('reminders', {
|
||||
name: 'Reminders',
|
||||
|
|
Loading…
Reference in a new issue