Fix: unable to delete unread conversation
This commit is contained in:
@@ -62,17 +62,15 @@ async function deleteConversation(checkbox) {
|
|||||||
|
|
||||||
console.log("conversationElement", conversationElement);
|
console.log("conversationElement", conversationElement);
|
||||||
|
|
||||||
// Look for hoverable element within the conversation element
|
// Look for draggable element within the conversation element
|
||||||
const hoverableDiv = conversationElement.querySelector(
|
const draggableElement = conversationElement.querySelector("[draggable=\"true\"]");
|
||||||
"div.can-hover\\:group-hover\\:visible"
|
if (!draggableElement) {
|
||||||
);
|
console.log("Skipping conversation - no interactive elements found");
|
||||||
if (!hoverableDiv) {
|
|
||||||
console.log("Skipping conversation - no hoverable element found");
|
|
||||||
// Show notification to user
|
// Show notification to user
|
||||||
const title =
|
const title =
|
||||||
conversationElement.querySelector(Selectors.TITLE_SELECTOR)
|
conversationElement.querySelector(Selectors.TITLE_SELECTOR)
|
||||||
?.textContent || "this conversation";
|
?.textContent || "this conversation";
|
||||||
alert(`Unable to delete unread conversation: "${title}".`);
|
alert(`Unable to delete the conversation: "${title}".`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +81,7 @@ async function deleteConversation(checkbox) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
console.log("1. Hovering over conversation...", conversationElement);
|
console.log("1. Hovering over conversation...", conversationElement);
|
||||||
conversationElement.dispatchEvent(hoverEvent);
|
draggableElement.dispatchEvent(hoverEvent);
|
||||||
await delay(200);
|
await delay(200);
|
||||||
|
|
||||||
// Try to find the three dot button
|
// Try to find the three dot button
|
||||||
|
|||||||
Reference in New Issue
Block a user