mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-09 00:23:20 +01:00
fix crashes on 9.0.22, bump
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user