|
|
@ -223,6 +223,10 @@ export const getUnreadMessageCount = createSelector(getLeftPaneLists, (state): n
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
export const getNumberOfPinnedConversations = createSelector(getConversations, (state): number => {
|
|
|
|
export const getNumberOfPinnedConversations = createSelector(getConversations, (state): number => {
|
|
|
|
const values = Object.values(state.conversationLookup);
|
|
|
|
let count = 0;
|
|
|
|
return values.filter(conversation => conversation.isPinned).length;
|
|
|
|
for (let key in state.conversationLookup) {
|
|
|
|
|
|
|
|
let value = state.conversationLookup[key];
|
|
|
|
|
|
|
|
if (value.isPinned) count++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return count;
|
|
|
|
});
|
|
|
|
});
|
|
|
|