Mail: folder unread counts refresh at once after a change, read state survives a late list, no wrong message after quick clicks, mark unread keeps the message in the list
build-container / build (push) Successful in 21m39s
build-container / build (push) Successful in 21m39s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89fd595809
commit
a3010299d0
4 files changed
+29
-9
No files matched your search
@@ -80,6 +80,9 @@ const free = () => 21000 + Math.floor(Math.random() * 20000);
|
||||
|
||||
// ================= flags, moving, deleting =================
|
||||
await A('/api/mail/update', { id: helloId, read: true }); r = await A('/api/mail/messages?folder=' + gm.id + '~inbox'); ok('mark as read', r.json.items[0].read === true, r.json.items[0]);
|
||||
r = await A('/api/mail/folders?acct=' + gm.id); const unreadBefore = r.json[0].unread;
|
||||
await A('/api/mail/update', { id: helloId, read: false }); r = await A('/api/mail/folders?acct=' + gm.id); ok('the folder unread count follows a change at once (not the 30 s copy)', r.json[0].unread === unreadBefore + 1, r.json[0]);
|
||||
await A('/api/mail/update', { id: helloId, read: true }); r = await A('/api/mail/folders?acct=' + gm.id);
|
||||
await A('/api/mail/update', { id: helloId, read: false, flagged: true }); r = await A('/api/mail/messages?folder=' + gm.id + '~inbox'); ok('mark unread and flag', r.json.items[0].read === false && r.json.items[0].flagged === true, r.json.items[0]);
|
||||
r = await A('/api/mail/update', { id: helloId }); ok('an update with nothing to change is refused', r.status === 400, r.status);
|
||||
const archBefore = (await peek('[Gmail]/All Mail')).messages;
|
||||
|
||||
Reference in new issue
Block a user