Split discussion controls into three groups:

- user (reply, subscription)
- moderation (rename, sticky, tags)
- destructive (delete)

Will keep extension-added items organised nicely
This commit is contained in:
Toby Zerner
2015-06-25 15:31:15 +09:30
parent d81fe3ac36
commit 8fe2f54489
2 changed files with 39 additions and 6 deletions

View File

@ -59,7 +59,18 @@ export default class ItemList {
}
});
return array.map((item) => item.content);
array = array.map(item => item.content);
//recursively flatten array
for (var i = 0, len = array.length; i < len; i++) {
if (array[i] instanceof Array) {
array = array.concat.apply([], array);
i-- //check current index again and flatten until there are no more nested arrays at that index
len = array.length;
}
}
return array;
}
}