Show/hide drafts list script not working as expected

Wanted an action for this so I could map my own keyboard shortcut. With the drafts list is pinned, this will invoke the drafts list if the drafts list is not visible, but fails to hide the drafts list when it’s already visible. Have I overlooked something simple in the script, or is there something I need to do to account for the list’s pinned status?

 // Check if the drafts list is currently visible
if (app.currentWindow.isDraftListVisible) {
    // Hide the drafts list
    app.currentWindow.hideDraftList();
 } else {
    // Show the drafts list
    app.currentWindow.showDraftList();
 }

Looks to me like app.currentWindow.isDraftListVisible is returning the correct true/false value on the Mac, but on the iPad, it is always returning true.

Do you see that too if you check the value?

1 Like

Weird. Can’t easily check on Mac, but yes, I do see it returning true even when the list isn’t visible. Is it just me, or is it also returning true if the action list is visible, regardless of whether the drafts list is visible or not?

I’ll use the existing key combo for now (CMD+1), but glad to know it’s likely not just me missing something obvious…

Confirmed here. Will fix.

1 Like