xi-conversations

Minimal clone of thunderbird conversations
git clone https://git.ce9e.org/xi-conversations.git

commit
2395488e17b20494d623734598d93ca8d7eeeff6
parent
d5d31834c63f6f563ac5aa2136724549a1ba5f5a
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-08-12 10:31
expand message if it was explicitly selected

Diffstat

M experiment-api/api.js 1 +
M src/js/main.js 7 ++++++-

2 files changed, 7 insertions, 1 deletions


diff --git a/experiment-api/api.js b/experiment-api/api.js

@@ -79,6 +79,7 @@ var xi = class extends ExtensionCommon.ExtensionAPI {
   79    79 				body: glodaMsg._indexedBodyText,
   80    80 				canReplyToList: !!glodaMsg.mailingLists,
   81    81 				attachmentInfos: glodaMsg.attachmentInfos.map(a => ({name: a.name, url: a.url})),
   -1    82 				uri: msg2uri(glodaMsg.folderMessage),
   82    83 			});
   83    84 		};
   84    85 

diff --git a/src/js/main.js b/src/js/main.js

@@ -15,7 +15,12 @@ browser.xi.getConversation(initialUris).then(function(conversation) {
   15    15 
   16    16 	for (let i = 0; i < conversation.length; i++) {
   17    17 		const msg = conversation[i];
   18    -1 		const expanded = conversation.length === 1 || !msg.read || (!anyExpanded && i === conversation.length - 1);
   -1    18 		const expanded = (
   -1    19 			conversation.length === 1
   -1    20 			|| !msg.read
   -1    21 			|| (initialUris.length === 1 && initialUris.includes(msg.uri))
   -1    22 			|| (!anyExpanded && i === conversation.length - 1)
   -1    23 		);
   19    24 
   20    25 		const message = createMessageElement(msg, expanded);
   21    26 		container.appendChild(message);