Moving flag to the bottom

This commit is contained in:
Belen Curcio
2017-07-31 09:46:51 -03:00
parent 1b017daf62
commit 33a75aa4d0
+7 -7
View File
@@ -67,18 +67,12 @@ function addCommentToQueue(root, queue, comment, sort) {
function getCommentQueues(comment) {
const queues = ['all'];
if (comment.status === 'APPROVED') {
if (comment.status === 'ACCEPTED') {
queues.push('approved');
}
else if (comment.status === 'REJECTED') {
queues.push('rejected');
}
else if (
['NONE', 'PREMOD'].indexOf(comment.status) >= 0
&& comment.actions && comment.actions.some((a) => a.__typename === 'FlagAction')
) {
queues.push('flagged');
}
else if (comment.status === 'PREMOD') {
queues.push('premod');
queues.push('new');
@@ -86,6 +80,12 @@ function getCommentQueues(comment) {
else if (comment.status === 'NONE') {
queues.push('new');
}
else if (
['NONE', 'PREMOD'].indexOf(comment.status) >= 0
&& comment.actions && comment.actions.some((a) => a.__typename === 'FlagAction')
) {
queues.push('flagged');
}
return queues;
}