Fixed proxiwash screen not updating and removed more console.log

This commit is contained in:
keplyx 2020-02-23 22:04:07 +01:00
parent df407086a4
commit 2598be6e49
4 changed files with 6 additions and 41 deletions

View file

@ -63,13 +63,6 @@ export default class FetchedDataSectionList extends React.Component<Props, State
this.renderItemNotEmpty = this.renderItem.bind(this, false); this.renderItemNotEmpty = this.renderItem.bind(this, false);
} }
shouldComponentUpdate(nextProps: Props, nextState: State): boolean {
return this.state.refreshing !== nextState.refreshing ||
nextState.firstLoading !== this.state.firstLoading ||
nextState.machinesWatched.length !== this.state.machinesWatched.length ||
nextState.fetchedData.len !== this.state.fetchedData.len;
}
/** /**
* Get the translation for the header in the current language * Get the translation for the header in the current language

View file

@ -232,7 +232,7 @@ export default class PlanningScreen extends React.Component<Props, State> {
this.setState({ this.setState({
refreshing: false, refreshing: false,
}); });
console.log(err); // console.log(err);
}); });
} }
}; };

View file

@ -123,18 +123,8 @@ export default class NotificationsManager {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}), }),
body: JSON.stringify(data) // <-- Post parameters body: JSON.stringify(data) // <-- Post parameters
}) });
.then((response) => response.json())
.then((responseJson) => {
callback(responseJson);
})
.catch((error) => {
console.log(error);
});
} else {
console.log('Expo token not available');
} }
} }
/** /**
@ -161,16 +151,7 @@ export default class NotificationsManager {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}), }),
body: JSON.stringify(data) // <-- Post parameters body: JSON.stringify(data) // <-- Post parameters
}) });
.then((response) => response.text())
.then((responseText) => {
console.log(responseText);
})
.catch((error) => {
console.log(error);
});
} else {
console.log('Expo token not available');
} }
} }
@ -194,16 +175,7 @@ export default class NotificationsManager {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}), }),
body: JSON.stringify(data) // <-- Post parameters body: JSON.stringify(data) // <-- Post parameters
}) });
.then((response) => response.text())
.then((responseText) => {
console.log(responseText);
})
.catch((error) => {
console.log(error);
});
} else {
console.log('Expo token not available');
} }
} }
} }

View file

@ -25,8 +25,8 @@ export default class WebDataManager {
let response = await fetch(this.FETCH_URL); let response = await fetch(this.FETCH_URL);
fetchedData = await response.json(); fetchedData = await response.json();
} catch (error) { } catch (error) {
console.log('Could not read FetchedData from server'); // console.log('Could not read FetchedData from server');
console.log(error); // console.log(error);
throw new Error('Could not read FetchedData from server'); throw new Error('Could not read FetchedData from server');
} }
this.lastDataFetched = fetchedData; this.lastDataFetched = fetchedData;