Skip to content

Commit

Permalink
Fix log-out bug (#35)
Browse files Browse the repository at this point in the history
* Fix log-out bug

* Prettify
  • Loading branch information
dedoussis authored Jun 29, 2023
1 parent d46f5d4 commit a77e51b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
20 changes: 12 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "icloud-hide-my-email-browser-extension",
"version": "1.0.7",
"version": "1.1.0",
"description": "Cross-browser extension enabling the usage of iCloud's Hide My Email service.",
"license": "MIT",
"author": "dedoussis",
Expand Down
18 changes: 10 additions & 8 deletions src/pages/Background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const getClient = async (withTokenValidation = true): Promise<ICloudClient> => {
title: SIGNED_OUT_CTA_COPY,
enabled: false,
})
.catch();
.catch(console.debug);
}
}
return client;
Expand Down Expand Up @@ -106,7 +106,7 @@ browser.runtime.onMessage.addListener(async (message: Message<unknown>) => {
title: SIGNED_IN_CTA_COPY,
enabled: true,
})
.catch();
.catch(console.debug);
}
break;
case MessageType.GenerateRequest:
Expand Down Expand Up @@ -196,7 +196,7 @@ const createContextMenuItem = (): void => {
title: SIGNED_OUT_CTA_COPY,
enabled: false,
})
.catch();
.catch(console.debug);
return;
}

Expand All @@ -205,7 +205,7 @@ const createContextMenuItem = (): void => {
title: SIGNED_IN_CTA_COPY,
enabled: true,
})
.catch();
.catch(console.debug);
}
);
};
Expand Down Expand Up @@ -279,10 +279,12 @@ browser.contextMenus.onClicked.addListener(async (info, tab) => {
);
} catch (e) {
if (e instanceof ClientAuthenticationError) {
browser.contextMenus.update(CONTEXT_MENU_ITEM_ID, {
title: SIGNED_OUT_CTA_COPY,
enabled: false,
});
browser.contextMenus
.update(CONTEXT_MENU_ITEM_ID, {
title: SIGNED_OUT_CTA_COPY,
enabled: false,
})
.catch(console.debug);

sendMessageToTab(
MessageType.ActiveInputElementWrite,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ async function logOut(client: ICloudClient): Promise<void> {
title: SIGNED_OUT_CTA_COPY,
enabled: false,
})
.catch();
.catch(console.debug);
}

const SignOutButton = (props: {
Expand Down

0 comments on commit a77e51b

Please sign in to comment.