courrier preview
This commit is contained in:
parent
b859b733f6
commit
fc8276494d
@ -32,6 +32,8 @@ const toastVariants = cva(
|
|||||||
default: "border bg-background text-foreground",
|
default: "border bg-background text-foreground",
|
||||||
destructive:
|
destructive:
|
||||||
"destructive group border-destructive bg-destructive text-destructive-foreground",
|
"destructive group border-destructive bg-destructive text-destructive-foreground",
|
||||||
|
"new-email":
|
||||||
|
"border-blue-500 bg-blue-600 text-white",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
|
|||||||
@ -603,14 +603,16 @@ export const useEmailState = () => {
|
|||||||
if (data.newestEmailId && data.newestEmailId > lastKnownEmailId) {
|
if (data.newestEmailId && data.newestEmailId > lastKnownEmailId) {
|
||||||
logEmailOp('NEW_EMAILS', `Found new emails, newest ID: ${data.newestEmailId} (current: ${lastKnownEmailId})`);
|
logEmailOp('NEW_EMAILS', `Found new emails, newest ID: ${data.newestEmailId} (current: ${lastKnownEmailId})`);
|
||||||
|
|
||||||
// Show a toast notification
|
// Show a toast notification with the new custom variant
|
||||||
toast({
|
toast({
|
||||||
|
variant: "new-email", // Use our new custom variant
|
||||||
title: "New emails",
|
title: "New emails",
|
||||||
description: "You have new emails in your inbox",
|
description: "You have new emails in your inbox",
|
||||||
duration: 5000
|
duration: 5000
|
||||||
});
|
});
|
||||||
|
|
||||||
// Force refresh the current view to show the new emails
|
// Force refresh the current view to show the new emails immediately
|
||||||
|
// This ensures panel 2 (email list) gets updated
|
||||||
loadEmails(1, state.perPage, false);
|
loadEmails(1, state.perPage, false);
|
||||||
} else {
|
} else {
|
||||||
logEmailOp('CHECK_NEW_EMAILS', 'No new emails found');
|
logEmailOp('CHECK_NEW_EMAILS', 'No new emails found');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user