Swift v1.2

This commit is contained in:
eevee
2024-04-24 03:08:27 +03:00
parent b2058f4333
commit e9bd4e4e53
5 changed files with 12 additions and 39 deletions
@@ -1,26 +0,0 @@
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
}
}
+9 -10
View File
@@ -60,19 +60,18 @@ struct EeveeSpotify: Tweak {
try blankData.write(to: filePath)
NSLog("[EeveeSpotify] Successfully applied")
Timer.scheduledTimer(withTimeInterval: 20, repeats: true) { _ in
do {
try blankData.write(to: filePath)
NSLog("[EeveeSpotify] Successfully reapplied")
}
catch {
NSLog("[EeveeSpotify] Unable to reapply (write data): \(error)")
}
}
}
catch {
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
WindowHelper.shared.showPopup(
message: "Unable to apply tweak: \(error)",
buttonText: "OK"
)
}
NSLog("[EeveeSpotify] Unable to apply tweak: \(error)")
}
}