Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Fix some bugs with the recent changes to authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
paced committed Oct 5, 2021
1 parent 18b0ddf commit 38eff3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/domain/spotify-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports.execute = function (parentWindow, tray) {

if (localStorage.get("userUri")) {
getCurrentPlayback();
} else {
} else if (parentWindow !== undefined) {
// Change the renderer to show the login prompt rather than a loading symbol.

sendToRendererProcess("login", {});
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ function manageTrayRightClick(_tray) {
localStorage.save("accessToken", undefined);
localStorage.save("refreshToken", undefined);
localStorage.save("userUri", undefined);

// Neutralise the title.

_tray.setTitle("");
}
} : {
label: "Log In with Spotify",
Expand All @@ -155,6 +159,7 @@ function manageTrayRightClick(_tray) {
label: "Quit",
click: function () {
window.setClosable(true);
window = undefined;

app.quit();
}
Expand Down

0 comments on commit 38eff3c

Please sign in to comment.