"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ts/state/ducks/conversations.ts" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

conversations.ts  (Signal-Desktop-1.35.2):conversations.ts  (Signal-Desktop-1.36.1)
skipping to change at line 1012 skipping to change at line 1012
} }
} }
// Removing it from our caches // Removing it from our caches
const messageIds = without(existingConversation.messageIds, id); const messageIds = without(existingConversation.messageIds, id);
const heightChangeMessageIds = without( const heightChangeMessageIds = without(
existingConversation.heightChangeMessageIds, existingConversation.heightChangeMessageIds,
id id
); );
let metrics;
if (messageIds.length === 0) {
metrics = {
totalUnread: 0,
};
} else {
metrics = {
...existingConversation.metrics,
oldest,
newest,
};
}
return { return {
...state, ...state,
messagesLookup: omit(messagesLookup, id), messagesLookup: omit(messagesLookup, id),
messagesByConversation: { messagesByConversation: {
[conversationId]: { [conversationId]: {
...existingConversation, ...existingConversation,
messageIds, messageIds,
heightChangeMessageIds, heightChangeMessageIds,
metrics: { metrics,
...existingConversation.metrics,
oldest,
newest,
},
}, },
}, },
}; };
} }
if (action.type === 'MESSAGES_ADDED') { if (action.type === 'MESSAGES_ADDED') {
const { conversationId, isActive, isNewMessage, messages } = action.payload; const { conversationId, isActive, isNewMessage, messages } = action.payload;
const { messagesByConversation, messagesLookup } = state; const { messagesByConversation, messagesLookup } = state;
const existingConversation = messagesByConversation[conversationId]; const existingConversation = messagesByConversation[conversationId];
if (!existingConversation) { if (!existingConversation) {
 End of changes. 2 change blocks. 
5 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)