cleaning things up for making it work with moving things from done

This commit is contained in:
Arjun Patel
2022-02-05 13:35:16 -08:00
parent 2a28cb9afd
commit 0f574475a7
2 changed files with 15 additions and 12 deletions
@@ -193,7 +193,7 @@ function Sidebar() {
Priority
</span>
<FaPlus className="text-slate-400 text-lg shrink-0 ml-auto" />
{/* <FaPlus className="text-slate-400 text-lg shrink-0 ml-auto" /> */}
</span>
{/* list of pinned convos */}
+14 -11
View File
@@ -177,20 +177,23 @@ export const doneConvosSelector = selector<Conversation[]>({
// if convo lastActivityDate > lastInteractionDate
// move to default/inbox convos
const userConvoAssoc = convoUserMap.get(conv.id);
if (
userConvoAssoc?.lastInteractionDate &&
conv.lastActivityDate > userConvoAssoc?.lastInteractionDate
) {
conversationService.updateUserConvoRelationship(
userConvoAssoc.id,
conv.id,
ConversationMemberState.default,
false
);
}
// get the userconvoAssoc and see the state
if (userConvoAssoc?.state == ConversationMemberState.done) {
if (
userConvoAssoc?.lastInteractionDate &&
conv.lastActivityDate > userConvoAssoc?.lastInteractionDate
) {
conversationService.updateUserConvoRelationship(
userConvoAssoc.id,
conv.id,
ConversationMemberState.default,
false
);
return false;
}
return true;
}