Skip to content

Commit

Permalink
Merge pull request #28 from memeller/dev
Browse files Browse the repository at this point in the history
Fixed #26
  • Loading branch information
memeller authored Mar 14, 2024
2 parents 320b701 + c6d541d commit c216329
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v5.8.1

- Fixed error when autoresize is enabled and resize is set to "on sending mail". When sending email with these settings, autoresize would resize the images and remove them from the list of images to resize. When "when sending email" was selected, the options window tried to be created because there was no check if the autoresize option was turned on and if the options window should be ommitted. Since there was no check if the image list was empty, the code caused an exception that stopped the email sending process. (#26)

## v5.8.0

- Added option to also resize images from the original e-mail when using forward / reply (#15). This feature also works with autoresize.\
Expand Down
5 changes: 3 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function processAllAttachments(tab, details,isOnDemand=false) {
if (!promises.length) {
return result;
}
if(!isOnDemand)
if(!isOnDemand && (options.autoResize!="attached" || options.autoResize!="all"))
await showOptionsDialog(tab);
await Promise.all(promises).catch(() => {
result.cancel = true;
Expand Down Expand Up @@ -203,7 +203,8 @@ browser.shrunked.onNotificationCancelled.addListener(tab => cancelResize(tab.id)

async function showOptionsDialog(tab) {
let sourceFiles = tabMap.get(tab.id);

if(sourceFiles === undefined)
return;
let optionsWindow = await browser.windows.create({
url: `content/options.xhtml?tabId=${tab.id}&count=${sourceFiles.length}`,
type: "popup",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "5.8.0",
"version": "5.8.1",
"applications": {
"gecko": {
"id": "[email protected]",
Expand Down

0 comments on commit c216329

Please sign in to comment.