SpotifyHidePremium

This commit is contained in:
eevee
2024-04-22 17:30:51 +03:00
parent 763ac1c978
commit de46da7055
2 changed files with 26 additions and 2 deletions
-2
View File
@@ -20,6 +20,4 @@ Tweak also changes query parameters `trackRows` and `video` to true, so Spotify
There is no offline or very high quality (similar to Spotilife) because these features are server-sided (i.e., you can't get very high quality tracks from the server without a subscription). In theory, it might be possible to implement offline mode locally, but not in this tweak.
To hide the Premium tab, use [SpotifyHidePremium](https://t.me/SpotilifeIPAs/36).
To open Spotify links in sideloaded app, use [OpenSpotifySafariExtension](https://github.com/BillyCurtis/OpenSpotifySafariExtension).
@@ -0,0 +1,26 @@
import Orion
import UIKit
class UITabBarHook: ClassHook<UITabBar> {
// there is only one UITabBar, so no problem
func items() -> [UITabBarItem] {
return Array(orig.items().prefix(3))
}
}
class UITabBarButtonLabelHook: ClassHook<UIView> {
static let targetName = "UITabBarButtonLabel"
func text() -> String {
let text = orig.text()
if text == "Premium" {
target.superview?.removeFromSuperview()
}
return text
}
}