saving...

This commit is contained in:
Aj Wazzan
2025-04-04 20:47:46 -07:00
parent 3a6c8a4b85
commit 64071fe6ca
2 changed files with 3 additions and 1 deletions

View File

@@ -542,6 +542,8 @@ export const MailList = memo(({ isCompact }: MailListProps) => {
return;
}
void markAsRead({ ids: [message.threadId ?? message.id] }).then(() => mutate());
router.push(`/mail/inbox?threadId=${message.threadId ?? message.id}`);
},
[getSelectMode, folder, searchParams, items, handleMouseEnter],

View File

@@ -128,7 +128,7 @@ export const useThreads = () => {
};
};
export const useThread = (threadId?: string) => {
export const useThread = (threadId: string | null) => {
const { data: session } = useSession();
const searchParams = useSearchParams();
const id = threadId ? threadId : searchParams.get('threadId');