Public node WASM, performance and fixes (#5734)

This commit is contained in:
Maciej Hirsz
2017-06-12 15:57:16 +02:00
committed by Arkadiy Paronyan
parent edea41d35e
commit b2a42f03eb
32 changed files with 739 additions and 129 deletions

View File

@@ -99,11 +99,19 @@ function mapStateToProps (initState) {
}));
return (state) => {
const { availability = 'unknown' } = state.nodeStatus.nodeKind || {};
const { views } = state.settings;
const viewIds = Object
.keys(views)
.filter((id) => views[id].fixed || views[id].active);
.filter((id) => {
const view = views[id];
const isEnabled = view.fixed || view.active;
const isAllowed = !view.onlyPersonal || availability === 'personal';
return isEnabled && isAllowed;
});
if (isEqual(viewIds, filteredViewIds)) {
return { views: filteredViews };