mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 04:00:33 +08:00
actually, we want to have the action_summaries on all requests, since a plugin could potentially pre-flag a pre-mod comment
This commit is contained in:
@@ -21,13 +21,8 @@ const lang = new I18n(translations);
|
||||
const Comment = ({actions = [], comment, ...props}) => {
|
||||
const links = linkify.getMatches(comment.body);
|
||||
const linkText = links ? links.map(link => link.raw) : [];
|
||||
|
||||
let flagActionSummaries;
|
||||
let flagActions;
|
||||
if (comment.action_summaries) { // this might be missing if we're on the pre-mod tab
|
||||
flagActionSummaries = getActionSummary('FlagActionSummary', comment);
|
||||
flagActions = comment.actions && comment.actions.filter(a => a.__typename === 'FlagAction');
|
||||
}
|
||||
const flagActionSummaries = getActionSummary('FlagActionSummary', comment);
|
||||
const flagActions = comment.actions && comment.actions.filter(a => a.__typename === 'FlagAction');
|
||||
|
||||
return (
|
||||
<li tabIndex={props.index} className={`mdl-card ${props.selected ? 'mdl-shadow--8dp' : 'mdl-shadow--2dp'} ${styles.Comment} ${styles.listItem}`}>
|
||||
|
||||
@@ -12,6 +12,12 @@ fragment commentView on Comment {
|
||||
id
|
||||
title
|
||||
}
|
||||
action_summaries {
|
||||
count
|
||||
... on FlagActionSummary {
|
||||
reason
|
||||
}
|
||||
}
|
||||
actions {
|
||||
... on FlagAction {
|
||||
reason
|
||||
|
||||
@@ -15,12 +15,6 @@ query ModQueue ($asset_id: ID, $sort: SORT_ORDER) {
|
||||
sort: $sort
|
||||
}) {
|
||||
...commentView
|
||||
action_summaries {
|
||||
count
|
||||
... on FlagActionSummary {
|
||||
reason
|
||||
}
|
||||
}
|
||||
}
|
||||
rejected: comments(query: {
|
||||
statuses: [REJECTED],
|
||||
|
||||
Reference in New Issue
Block a user