Skip to content

Commit

Permalink
fix crashes on 9.0.22, bump
Browse files Browse the repository at this point in the history
  • Loading branch information
whoeevee committed Mar 4, 2025
1 parent d055e63 commit 1b0865f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Sources/EeveeSpotify/DarkPopUps.x.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ import SwiftUI

struct DarkPopUps: HookGroup { }

private let popUpContainerViewController = EeveeSpotify.isOldSpotifyVersion
? "SPTEncorePopUpContainer"
: "EncoreConsumerMobile_Wrappers.PopUpPresentableContainer"

class EncoreLabelHook: ClassHook<UIView> {
typealias Group = DarkPopUps
static let targetName = "SPTEncoreLabel"

func intrinsicContentSize() -> CGSize {
if let viewController = WindowHelper.shared.viewController(for: target),
NSStringFromClass(type(of: viewController)) == "SPTEncorePopUpContainer"
NSStringFromClass(type(of: viewController)) == popUpContainerViewController
{
let label = Dynamic.convert(target.subviews.first!, to: UILabel.self)

Expand All @@ -25,7 +29,7 @@ class EncoreLabelHook: ClassHook<UIView> {

class SPTEncorePopUpContainerHook: ClassHook<UIViewController> {
typealias Group = DarkPopUps
static let targetName = "SPTEncorePopUpContainer"
static let targetName = popUpContainerViewController

func containedView() -> SPTEncorePopUpDialog {
return orig.containedView()
Expand Down
5 changes: 3 additions & 2 deletions Sources/EeveeSpotify/Tweak.x.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ func exitApplication() {
struct PremiumPatchingGroup: HookGroup { }

struct EeveeSpotify: Tweak {
static let version = "5.8.7"
static let isOldSpotifyVersion = NSClassFromString("Lyrics_NPVCommunicatorImpl.LyricsOnlyViewController") == nil
static let version = "5.8.8"
static let isOldSpotifyVersion =
NSClassFromString("Lyrics_NPVCommunicatorImpl.LyricsOnlyViewController") == nil

init() {
if UserDefaults.darkPopUps {
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.eevee.spotify
Name: EeveeSpotify
Version: 5.8.7
Version: 5.8.8
Architecture: iphoneos-arm
Description: A tweak to get Spotify Premium for free, just like Spotilife
Maintainer: Eevee
Expand Down

0 comments on commit 1b0865f

Please sign in to comment.