Skip to content

Commit 8c6555a

Browse files
committed
cleanup
1 parent 67522cf commit 8c6555a

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

extension/js/common/browser/browser-msg.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ export namespace Bm {
118118
export type ExpirationCacheDeleteExpired = Promise<void>;
119119
export type ThunderbirdGetDownloadableAttachment = ThunderbirdAttachment[];
120120
export type ThunderbirdGetCurrentUser = string | undefined;
121-
export type ThunderbirdMsgGet = { attachments: messenger.messages.MessageAttachment[]; messagePart: messenger.messages.MessagePart };
122121
export type ThunderbirdOpenPassphraseDialog = Promise<void>;
123122
export type ThunderbirdInitiateAttachmentDownload = Promise<void>;
124123
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -138,8 +137,7 @@ export namespace Bm {
138137
| ExpirationCacheDeleteExpired
139138
| AjaxGmailAttachmentGetChunk
140139
| ConfirmationResult
141-
| ThunderbirdGetDownloadableAttachment
142-
| ThunderbirdMsgGet;
140+
| ThunderbirdGetDownloadableAttachment;
143141
}
144142

145143
export type AnyRequest =
@@ -251,7 +249,6 @@ export class BrowserMsg {
251249
BrowserMsg.sendAwait(undefined, 'thunderbirdInitiateAttachmentDownload', bm, true) as Promise<Bm.Res.ThunderbirdInitiateAttachmentDownload>,
252250
thunderbirdGetCurrentUser: () =>
253251
BrowserMsg.sendAwait(undefined, 'thunderbirdGetCurrentUser', undefined, true) as Promise<Bm.Res.ThunderbirdGetCurrentUser>,
254-
thunderbirdMsgGet: () => BrowserMsg.sendAwait(undefined, 'thunderbirdMsgGet', undefined, true) as Promise<Bm.Res.ThunderbirdMsgGet>,
255252
thunderbirdOpenPassphraseDiaglog: (bm: Bm.ThunderbirdOpenPassphraseDialog) =>
256253
BrowserMsg.sendAwait(undefined, 'thunderbirdOpenPassphraseDialog', bm, true) as Promise<Bm.Res.ThunderbirdOpenPassphraseDialog>,
257254
},

extension/js/service_worker/background.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ console.info('background.js service worker starting');
7474
BgHandlers.thunderbirdSecureComposeHandler();
7575
await BgHandlers.thunderbirdContentScriptRegistration();
7676
BrowserMsg.bgAddListener('thunderbirdGetCurrentUser', BgHandlers.thunderbirdGetCurrentUserHandler);
77-
BrowserMsg.bgAddListener('thunderbirdMsgGet', BgHandlers.thunderbirdMsgGetHandler);
7877
BrowserMsg.bgAddListener('thunderbirdGetDownloadableAttachment', BgHandlers.thunderbirdGetDownloadableAttachment);
7978
BrowserMsg.bgAddListener('thunderbirdInitiateAttachmentDownload', BgHandlers.thunderbirdInitiateAttachmentDownload);
8079
BrowserMsg.bgAddListener('thunderbirdOpenPassphraseDialog', BgHandlers.thunderbirdOpenPassphraseDialog);

extension/js/service_worker/bg-handlers.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -218,19 +218,6 @@ export class BgHandlers {
218218
return;
219219
};
220220

221-
public static thunderbirdMsgGetHandler = async (): Promise<Bm.Res.ThunderbirdMsgGet> => {
222-
const [tab] = await messenger.tabs.query({ active: true, currentWindow: true });
223-
if (tab.id) {
224-
const message = await messenger.messageDisplay.getDisplayedMessage(tab.id);
225-
if (message?.id) {
226-
const attachments = await messenger.messages.listAttachments(message.id);
227-
const messagePart = await messenger.messages.getFull(message.id);
228-
return { attachments, messagePart };
229-
}
230-
}
231-
return { attachments: [], messagePart: {} as messenger.messages.MessagePart };
232-
};
233-
234221
public static thunderbirdOpenPassphraseDialog = async (r: Bm.ThunderbirdOpenPassphraseDialog): Promise<Bm.Res.ThunderbirdOpenPassphraseDialog> => {
235222
await BgUtils.openExtensionTab(`chrome/elements/passphrase.htm?type=message&parentTabId=0&acctEmail=${r.acctEmail}&longids=${r.longids}`, true);
236223
};

0 commit comments

Comments
 (0)