Skip to content

Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.

C

fix: the cover no longer covers the animated artwork after a relaunch

My-Name-Is-Jeff52d602b10a75
diff --git a/tweak/Sources/Redesigned/Player/Player.h b/tweak/Sources/Redesigned/Player/Player.h
index 6992c850..060fb5a8 100644
--- a/tweak/Sources/Redesigned/Player/Player.h
+++ b/tweak/Sources/Redesigned/Player/Player.h
@@ -100,6 +100,8 @@ void SGRPlayerShowLandscape(BOOL show);
void SGRPlayerMotionLyricsChanged(void);
// The field was laid out (PlayerField.x): the clip goes onto it, and the cover is hidden or shown again.
void SGRPlayerMotionFieldLaidOut(void);
+// A cover in the player laid out: hides it while a clip plays.
+void SGRPlayerMotionCoverLaidOut(void);
// A clip is playing in place of the cover, which is then hidden: the lyrics' thumbnail and the open's
// flown cover fade where they are rather than flying to or from it.
BOOL SGRPlayerMotionShowing(void);
diff --git a/tweak/Sources/Redesigned/Player/PlayerArtwork.x b/tweak/Sources/Redesigned/Player/PlayerArtwork.x
index 3e7b1533..281659e3 100644
--- a/tweak/Sources/Redesigned/Player/PlayerArtwork.x
+++ b/tweak/Sources/Redesigned/Player/PlayerArtwork.x
@@ -292,6 +292,7 @@ static void fillRoom(UIView *tilt) {
if (!cover) return;
[sg_tilts addObject:tilt];
watchHold(tilt);
+ SGRPlayerMotionCoverLaidOut();
// The cover fills the tilt view (01.txt:37); bounds and center, unlike a frame, hold under the scale.
CGRect bounds = tilt.bounds;
CGPoint middle = CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds));
diff --git a/tweak/Sources/Redesigned/Player/PlayerMotion.x b/tweak/Sources/Redesigned/Player/PlayerMotion.x
index 1fd6e061..669e2248 100644
--- a/tweak/Sources/Redesigned/Player/PlayerMotion.x
+++ b/tweak/Sources/Redesigned/Player/PlayerMotion.x
@@ -447,6 +447,12 @@ void SGRPlayerMotionFieldLaidOut(void) {
setCoverShown(sg_motion == nil, NO);
}
+// A clip that came in before the player opened finds no cover to hide at the field's first pass, the covers
+// laying out after it (issue #19: the cover over the clip after a relaunch), so each cover's layout asks too.
+void SGRPlayerMotionCoverLaidOut(void) {
+ setCoverShown(sg_motion == nil, NO);
+}
+
BOOL SGRPlayerMotionShowing(void) {
return sg_motion != nil;
}