mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
Merge pull request #911 from coralproject/premodqueue
Create both a PreMod and a New Queue when stream is switched from one status to another
This commit is contained in:
@@ -208,17 +208,22 @@ class ModerationContainer extends Component {
|
||||
// Still loading.
|
||||
return <Spinner />;
|
||||
}
|
||||
} else if(asset !== undefined || !('premodCount' in root)) {
|
||||
} else if (asset !== undefined || !('premodCount' in root)) {
|
||||
|
||||
// loading.
|
||||
return <Spinner />;
|
||||
}
|
||||
|
||||
const premodEnabled = assetId ? isPremod(asset.settings.moderation) : isPremod(settings.moderation);
|
||||
const premodEnabled = assetId ? isPremod(asset.settings.moderation) :
|
||||
isPremod(settings.moderation);
|
||||
|
||||
const currentQueueConfig = Object.assign({}, this.props.queueConfig);
|
||||
if (premodEnabled) {
|
||||
|
||||
if (premodEnabled && root.newCount === 0) {
|
||||
delete currentQueueConfig.new;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!premodEnabled && root.premodCount === 0) {
|
||||
delete currentQueueConfig.premod;
|
||||
}
|
||||
|
||||
@@ -355,8 +360,9 @@ const withModQueueQuery = withQuery(({queueConfig}) => gql`
|
||||
variables: {
|
||||
asset_id: id,
|
||||
sortOrder: props.moderation.sortOrder,
|
||||
allAssets: id === null
|
||||
}
|
||||
allAssets: id === null,
|
||||
},
|
||||
fetchPolicy: 'network-only'
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import t from 'coral-framework/services/i18n';
|
||||
|
||||
export default {
|
||||
new: {
|
||||
statuses: ['NONE'],
|
||||
icon: 'question_answer',
|
||||
name: t('modqueue.new'),
|
||||
},
|
||||
premod: {
|
||||
statuses: ['PREMOD'],
|
||||
icon: 'access_time',
|
||||
name: t('modqueue.premod'),
|
||||
},
|
||||
new: {
|
||||
statuses: ['NONE', 'PREMOD'],
|
||||
icon: 'question_answer',
|
||||
name: t('modqueue.new'),
|
||||
},
|
||||
reported: {
|
||||
action_type: 'FLAG',
|
||||
statuses: ['NONE', 'PREMOD'],
|
||||
|
||||
Reference in New Issue
Block a user