diff --git a/src/Flows.js b/src/Flows.js index 14243c8..bbdfafd 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -171,6 +171,7 @@ class FlowSidebar extends PureComponent { replies: props.replies, loading_status: 'done', error_msg: null, + dz_only: false, }; this.color_picker=props.color_picker; this.syncState=props.sync_state||(()=>{}); @@ -284,6 +285,12 @@ class FlowSidebar extends PureComponent { } } + toggle_dz_only() { + this.setState((prevState)=>({ + dz_only: !prevState.dz_only, + })); + } + show_reply_bar(name,event) { if(this.reply_ref.current && !event.target.closest('a')) { let text=this.reply_ref.current.get(); @@ -303,6 +310,8 @@ class FlowSidebar extends PureComponent { let show_pid=load_single_meta(this.props.show_sidebar,this.props.token,this.props.parents.concat([this.state.info.pid])); + let replies_to_show=this.state.dz_only ? this.state.replies.filter((r)=>r.islz) : this.state.replies; + return (