Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeydarrenlau authored Aug 10, 2024
1 parent 8bd6166 commit e512a9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ export default class ObsidianSpotify extends Plugin {
}
});

async function refreshname(plugin: ObsidianSpotify) {
async function refreshname(settings: ObsidianSpotifySettings) {
try {
if(plugin.settings.spotify_access_token.access_token) {
if(settings.spotify_access_token.access_token) {

let data = await window.spotifysdk.currentUser.profile()
sharedstuff.get("usernametext").setText(data.display_name + " (" + data.id + ")")
Expand Down Expand Up @@ -338,7 +338,7 @@ export default class ObsidianSpotify extends Plugin {
console.log("[" + this.manifest.name + "] Authed successfuly");
RefreshClass.refreshInit({ sharedstuff, refreshspot, settings: this.settings, manifest: this.manifest });
try {
sharedstuff.get("refreshname")(this)
sharedstuff.get("refreshname")(this.settings)
} catch {}
});
}
Expand Down Expand Up @@ -433,7 +433,7 @@ class ObsidianSpotifySettingsTab extends PluginSettingTab {
const usernametext = usernamewrapcontainer.createSpan()

sharedstuff.set("usernametext", usernametext)
sharedstuff.get("refreshname")(this.plugin)
sharedstuff.get("refreshname")(this.plugin.settings)



Expand Down

0 comments on commit e512a9e

Please sign in to comment.