Skip to content

Commit

Permalink
Merge pull request #696 from surfbryce/Development
Browse files Browse the repository at this point in the history
4.1.3 Update
  • Loading branch information
surfbryce authored Jun 4, 2024
2 parents 580946a + a59b7be commit ac43e28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions Source/LyricViews/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ OnSpotifyReady
nowPlayingViewMaid.CleanUp()

// Now check to see if we have our card anchor
const cardAnchor = sidebar.querySelector<HTMLDivElement>(CardInsertAnchor)
const cardAnchor = contentsContainer!.querySelector<HTMLDivElement>(CardInsertAnchor)
if (cardAnchor === null) {
return
}
Expand All @@ -157,10 +157,7 @@ OnSpotifyReady
backgroundApplied = false
} else if (backgroundApplied === false) {
backgroundApplied = true
ApplyDynamicBackground(
sidebar.querySelector<HTMLDivElement>("aside")!,
backgroundMaid
)
ApplyDynamicBackground(contentsContainer!, backgroundMaid)
}
}
CheckDynamicBackground()
Expand Down Expand Up @@ -199,7 +196,6 @@ OnSpotifyReady
}
ShouldCreateCard()
nowPlayingViewMaid.GiveItems(
SongChanged.Connect(ShouldCreateCard),
SongLyricsLoaded.Connect(ShouldCreateCard),
SpotifyHistory.listen(ShouldCreateCard)
)
Expand All @@ -217,14 +213,10 @@ OnSpotifyReady
return
}

// Create our observer
const contentsObserver = contentsContainerMaid.Give(new MutationObserver(DeferCheckForNowPlaying))

// Check if there's anything we can do immediately
CheckForNowPlaying()

// Handle when we should check
contentsObserver.observe(contentsContainer, { childList: true })
contentsContainerMaid.Give(SongChanged.Connect(DeferCheckForNowPlaying))

}
Expand Down
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schemas.socalifornian.live/Spices/Build/Schema.json",
"Name": "beautiful-lyrics",
"Version": "4.1.2",
"Version": "4.1.3",

"ReleaseLocation": {
"Type": "Hosted",
Expand Down

0 comments on commit ac43e28

Please sign in to comment.