last session view: correct ordering from new to old
This commit is contained in:
parent
a576e91290
commit
05681b2a5a
|
@ -181,7 +181,7 @@ async function getFullData(swimTrackerHost, analysisSettings) {
|
|||
e.analysis = da.analyze(analysisSettings, e.startTime, e.values);
|
||||
}
|
||||
console.log("full data", parsed);
|
||||
return parsed;
|
||||
return parsed.reverse();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
@ -206,9 +206,6 @@ class LastSessionsView extends React.Component {
|
|||
request({ url: "http://" + this.props.swimTrackerHost + "/webdav/" + sessionFileName, method: "DELETE" })
|
||||
.then((value) => console.log("Successfully deleted", sessionFileName, value))
|
||||
.catch((err) => console.error("Failed to delete", sessionFileName, err));
|
||||
//this.setState({ sessions: null });
|
||||
//await request({ url: "http://" + this.props.swimTrackerHost + "/webdav/" + sessionFileName, method: "DELETE" });
|
||||
//this.setState({ sessions: await getFullData(this.props.swimTrackerHost, this.props.analysisSettings) });
|
||||
};
|
||||
|
||||
const onRefresh = async () => {
|
||||
|
@ -224,7 +221,7 @@ class LastSessionsView extends React.Component {
|
|||
style={{ width: "100%" }}
|
||||
keyExtractor={item => item.startTime.toString()}
|
||||
disableRightSwipe={true}
|
||||
data={this.state.sessions.reverse()}
|
||||
data={this.state.sessions}
|
||||
renderItem={(data, rowMap) => (
|
||||
<SessionCard
|
||||
textFirstLine={timeSince(data.item.startTime)}
|
||||
|
|
Loading…
Reference in New Issue