cleaning things up for making it work with moving things from done
This commit is contained in:
@@ -193,7 +193,7 @@ function Sidebar() {
|
|||||||
Priority
|
Priority
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<FaPlus className="text-slate-400 text-lg shrink-0 ml-auto" />
|
{/* <FaPlus className="text-slate-400 text-lg shrink-0 ml-auto" /> */}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{/* list of pinned convos */}
|
{/* list of pinned convos */}
|
||||||
|
|||||||
@@ -177,20 +177,23 @@ export const doneConvosSelector = selector<Conversation[]>({
|
|||||||
// if convo lastActivityDate > lastInteractionDate
|
// if convo lastActivityDate > lastInteractionDate
|
||||||
// move to default/inbox convos
|
// move to default/inbox convos
|
||||||
const userConvoAssoc = convoUserMap.get(conv.id);
|
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
|
// get the userconvoAssoc and see the state
|
||||||
if (userConvoAssoc?.state == ConversationMemberState.done) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user