reverse replies for reply timeline
This commit is contained in:
14
src/Flows.js
14
src/Flows.js
@@ -1083,7 +1083,8 @@ class FlowItemRow extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { show_sidebar, token, search_param, is_quote, mode } = this.props;
|
const { show_sidebar, token, search_param, is_quote, mode, submode } =
|
||||||
|
this.props;
|
||||||
let show_pid = load_single_meta(show_sidebar, token, [this.state.info.pid]);
|
let show_pid = load_single_meta(show_sidebar, token, [this.state.info.pid]);
|
||||||
|
|
||||||
let hl_rules = [['pid', PID_RE]];
|
let hl_rules = [['pid', PID_RE]];
|
||||||
@@ -1108,6 +1109,11 @@ class FlowItemRow extends PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let replies_to_show = this.state.replies.slice(0, PREVIEW_REPLY_COUNT);
|
||||||
|
if (mode === 'list' && submode === 1) {
|
||||||
|
replies_to_show.reverse();
|
||||||
|
}
|
||||||
|
|
||||||
let res = (
|
let res = (
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
@@ -1150,9 +1156,7 @@ class FlowItemRow extends PureComponent {
|
|||||||
<p>{this.state.reply_error}</p>
|
<p>{this.state.reply_error}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{this.state.replies
|
{replies_to_show.map(
|
||||||
.slice(0, PREVIEW_REPLY_COUNT)
|
|
||||||
.map(
|
|
||||||
(reply) =>
|
(reply) =>
|
||||||
(reply.can_del || !reply.is_blocked) && (
|
(reply.can_del || !reply.is_blocked) && (
|
||||||
<Reply
|
<Reply
|
||||||
@@ -1367,6 +1371,7 @@ function FlowChunk(props) {
|
|||||||
<FlowItemRow
|
<FlowItemRow
|
||||||
info={info}
|
info={info}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
|
submode={props.submode}
|
||||||
show_sidebar={props.show_sidebar}
|
show_sidebar={props.show_sidebar}
|
||||||
token={token}
|
token={token}
|
||||||
deletion_detect={props.deletion_detect}
|
deletion_detect={props.deletion_detect}
|
||||||
@@ -1789,6 +1794,7 @@ class SubFlow extends PureComponent {
|
|||||||
title={chunks.title}
|
title={chunks.title}
|
||||||
list={chunks.data}
|
list={chunks.data}
|
||||||
mode={mode}
|
mode={mode}
|
||||||
|
submode={submode}
|
||||||
search_param={search_param || null}
|
search_param={search_param || null}
|
||||||
show_sidebar={show_sidebar}
|
show_sidebar={show_sidebar}
|
||||||
deletion_detect={should_deletion_detect}
|
deletion_detect={should_deletion_detect}
|
||||||
|
|||||||
Reference in New Issue
Block a user