Sent messages are not archived
joonis opened this issue · 2 comments
joonis commented
- Thunderbird version: 115.11.0
- Thunderbird Conversation version: 4.1.7
- Operating System: Linux
What did you do?
In a conversation with received and sent messages I clicked on the upper right archive button.
What did you expect to happen?
All messages that are part of the conversation should be moved to the archive folder.
What actually happened?
Only the received messages were moved to the archive folder.
Here is the responsible function:
archiveConversation() {
return async (dispatch, getState) => {
const state = getState();
let msgs;
if (state.summary.isInTab || state.summary.prefs.operateOnConversations) {
msgs = state.messages.msgData.map((msg) => msg.id);
} else {
msgs = await browser.messageDisplay.getDisplayedMessages(
state.summary.tabId
);
msgs = msgs.map((m) => m.id);
}
browser.messages.archive(msgs).catch(console.error);
};
},
If one of state.summary.isInTab
or state.summary.prefs.operateOnConversations
evaluated to true
, it would work as expected. But this never seems to be the case.
Shouldn't it be done in the same way as it is done for toggleConversationRead()
:
toggleConversationRead({ read }) {
return async (dispatch, getState) => {
const state = getState().messages;
for (let msg of state.msgData) {
browser.messages.update(msg.id, { read }).catch(console.error);
}
};
},
Fix:
archiveConversation() {
return async (dispatch, getState) => {
const state = getState();
let msgs = state.messages.msgData.map((msg) => msg.id);
browser.messages.archive(msgs).catch(console.error);
};
},
joonis commented
Well, operateOnConversations
seems to be a property. Is it possible to set it somewhere?
joonis commented
Wow, just on the settings page :)