Browse Source

Fixed proxiwash screen not firing componentDidMount

keplyx 4 years ago
parent
commit
cf8014da3f
2 changed files with 3 additions and 2 deletions
  1. 1
    1
      components/FetchedDataSectionList.js
  2. 2
    1
      screens/ProxiwashScreen.js

+ 1
- 1
components/FetchedDataSectionList.js View File

@@ -51,7 +51,7 @@ export default class FetchedDataSectionList extends React.Component<Props, State
51 51
     }
52 52
 
53 53
     /**
54
-     * Refresh the FetchedData on first screen load
54
+     * Register react navigation events on first screen load
55 55
      */
56 56
     componentDidMount() {
57 57
         this.willFocusSubscription = this.props.navigation.addListener(

+ 2
- 1
screens/ProxiwashScreen.js View File

@@ -42,7 +42,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList {
42 42
      * Creates machine state parameters using current theme and translations
43 43
      */
44 44
     constructor() {
45
-        super(DATA_URL, 1000 * 60); // Refresh every minute
45
+        super(DATA_URL, 1000 * 10); // Refresh every minute
46 46
         let colors = ThemeManager.getCurrentThemeVariables();
47 47
         stateColors[MACHINE_STATES.TERMINE] = colors.proxiwashFinishedColor;
48 48
         stateColors[MACHINE_STATES.DISPONIBLE] = colors.proxiwashReadyColor;
@@ -78,6 +78,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList {
78 78
     }
79 79
 
80 80
     componentDidMount() {
81
+        super.componentDidMount();
81 82
         if (Platform.OS === 'android') {
82 83
             Expo.Notifications.createChannelAndroidAsync('reminders', {
83 84
                 name: 'Reminders',

Loading…
Cancel
Save