From f8c912a6d5adb18d2f947f3425c53ceecf3c6cde Mon Sep 17 00:00:00 2001 From: hole-thu Date: Sun, 16 Oct 2022 02:21:10 +0800 Subject: [PATCH] can cancel reaction & fold if too many downvote --- src/Flows.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Flows.js b/src/Flows.js index e2b55eb..16340eb 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -353,7 +353,9 @@ class FlowItem extends PureComponent {
do_react && do_react(1)} + onClick={() => + do_react && do_react(info.reaction_status === 1 ? 0 : 1) + } > do_react && do_react(-1)} + onClick={() => + do_react && do_react(info.reaction_status === -1 ? 0 : -1) + } > 10 && + props.info.down_votes > 2 * props.info.up_votes; this.color_picker = new ColorPicker(); this.state = { replies: props.info.comments @@ -1161,7 +1168,7 @@ class FlowItemRow extends PureComponent {
); - if (this.needFold || this.has_block_words) { + if (this.needFold || this.has_block_words || this.too_many_downvotes) { return ( (!this.has_block_words || mode !== 'list') && (
- {this.needFold ? '已折叠' : '已屏蔽'} + {this.needFold && '已折叠'} + {this.has_block_words && '已屏蔽'} + {this.too_many_downvotes && '反对较多'}