Basic redux integration for thread component (#141)
This commit is contained in:
committed by
Aleksei Gurianov
parent
b6cda91dd9
commit
a02b1502a6
@@ -0,0 +1,14 @@
|
||||
import store from 'common/store';
|
||||
|
||||
export const getThreadIsCollapsed = (state, comment) => {
|
||||
let collapsed = state.collapsedThreads[comment.id];
|
||||
|
||||
if (collapsed !== null && collapsed !== undefined) {
|
||||
return collapsed;
|
||||
}
|
||||
|
||||
const config = store.get('config') || {};
|
||||
const score = comment.score || 0;
|
||||
|
||||
return score <= config.critical_score;
|
||||
};
|
||||
Reference in New Issue
Block a user