fix: align hover styles and selection-toggle target with focused item

This commit is contained in:
Linus Rath
2026-04-21 23:50:55 +02:00
parent 76f6149841
commit 40982bc37b
4 changed files with 19 additions and 10 deletions
+6 -3
View File
@@ -1499,9 +1499,12 @@ export default function Home() {
} else {
selectAllEmails();
}
} else {
// Enter selection mode by selecting the first email
if (emails.length > 0) toggleEmailSelection(emails[0].id);
} else if (emails.length > 0) {
const currentId = selectedEmail?.id;
const target = currentId && emails.some((e) => e.id === currentId)
? currentId
: emails[0].id;
toggleEmailSelection(target);
}
}}
className={cn(