gmail.js
gmail.js copied to clipboard
Email messages in a thread has is_deleted=true even if they are not deleted
In a 4 mail thread when I opened the second mail its show me is_deleted=true. Even the mail was not deleted. Its start happening after 3 mail in a thread and after that the is_deleted=true number was increase.
I am able to account for deleted items in a thread with this code:
const openItem = $(newElement)
.closest('.h7[role="listitem"]')
// siblings no height = deleted thread items (not present in total_threads)
const siblings = openItem
.parent()
.children('[role="listitem"]')
.filter((_, e) => $(e).height())
let emailPosition = siblings.index(openItem) // search email container, get offset of message in un-deleted thread items
// get thread item from (undeleted) thread list
let email = this.openedEmailDetails.threads[this.openedEmailDetails.total_threads[emailPosition]]
It's pretty jankity. I would prefer a better solution that includes a list of messages in a thread that includes deleted messages instead of having to skip over messages with height=0
Old issue is old. Closing.