forked from newthuhole/hole_thu_frontend
sort reply by time
This commit is contained in:
@@ -71,7 +71,11 @@ class FlowItemRow extends Component {
|
|||||||
if(json.code!==0)
|
if(json.code!==0)
|
||||||
throw new Error(json.code);
|
throw new Error(json.code);
|
||||||
this.setState({
|
this.setState({
|
||||||
replies: json.data.map((info)=>{
|
replies: json.data
|
||||||
|
.sort((a,b)=>{
|
||||||
|
return parseInt(a.timestamp,10)-parseInt(b.timestamp,10);
|
||||||
|
})
|
||||||
|
.map((info)=>{
|
||||||
info._display_color=info.islz ? null : this.color_picker.get(info.name)
|
info._display_color=info.islz ? null : this.color_picker.get(info.name)
|
||||||
return info;
|
return info;
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user