fix: cleanup

pull/2789/head
William Grant 2 years ago
parent 45b904ce8c
commit fcadc8df07

@ -733,7 +733,7 @@ export async function updateConversationInteractionState({
await convo.commit();
window.log.debug(
`WIP: updateConversationInteractionState for ${conversationId} to ${type} ${status}`
`updateConversationInteractionState for ${conversationId} to ${type} ${status}`
);
}
}
@ -753,7 +753,7 @@ export async function clearConversationInteractionState({
convo.set('lastMessageInteractionStatus', undefined);
await convo.commit();
window.log.debug(`WIP: clearConversationInteractionState() for ${conversationId}`);
window.log.debug(`clearConversationInteractionState for ${conversationId}`);
}
}

@ -188,10 +188,7 @@ export class ConversationController {
return;
}
window.log.debug(`WIP: delete1o1 keepMessages ${id} ${options.keepMessages}`);
if (options.justHidePrivate || isNil(options.justHidePrivate) || conversation.isMe()) {
window.log.debug(`WIP: delete1o1 justHide ${id}`);
// we just set the hidden field to true
// so the conversation still exists (needed for that user's profile in groups) but is not shown on the list of conversation.
window.log.info(`deleteContact isPrivate, marking as hidden: ${id}`);
@ -201,7 +198,6 @@ export class ConversationController {
// We don't remove entries from the contacts wrapper, so better keep corresponding convo volatile info for now (it will be pruned if needed)
await conversation.commit(); // this updates the wrappers content to reflect the hidden state
} else {
window.log.debug(`WIP: delete1o1 delete ${id}`);
window.log.info(`deleteContact isPrivate, reset fields and removing from wrapper: ${id}`);
await conversation.setIsApproved(false, false);
@ -420,7 +416,6 @@ export class ConversationController {
// Note in some cases (hiding a conversation) we don't want to delete the messages
if (!keepMessages) {
window.log.debug(`WIP: ${deleteType} destroyingMessages: ${convoId}`);
// those are the stuff to do for all conversation types
window.log.info(`${deleteType} destroyingMessages: ${convoId}`);
await deleteAllMessagesByConvoIdNoConfirmation(convoId);

Loading…
Cancel
Save