simply replaces subscriptions

treat sdk preferences and sync as source of truth
This commit is contained in:
jessop 2020-02-03 20:53:49 -05:00 committed by Sean Yesmunt
parent 3cd639e0f0
commit 8773c95bf2

View file

@ -157,14 +157,7 @@ export default handleActions(
channelName: `@${channelName}`,
};
});
if (!state.subscriptions || !state.subscriptions.length) {
newSubscriptions = parsedSubscriptions;
} else {
const map = {};
newSubscriptions = parsedSubscriptions.concat(state.subscriptions).filter(sub => {
return map[sub.uri] ? false : (map[sub.uri] = true);
}, {});
}
newSubscriptions = parsedSubscriptions;
}
return {