fallback reasons

This commit is contained in:
eevee committed 2024-06-22 00:36:51 +03:00
1 parent 0f380f07e2
commit afbc8d597e
10 files changed
+164 -37

No files matched your search

@@ -7,6 +7,7 @@ extension UserDefaults {
private static let lyricsSourceKey = "lyricsSource"
private static let musixmatchTokenKey = "musixmatchToken"
private static let geniusFallbackKey = "geniusFallback"
private static let fallbackReasonsKey = "fallbackReasons"
private static let darkPopUpsKey = "darkPopUps"
private static let patchTypeKey = "patchType"
private static let overwriteConfigurationKey = "overwriteConfiguration"
@@ -42,6 +43,15 @@ extension UserDefaults {
defaults.set(fallback, forKey: geniusFallbackKey)
}
}
static var fallbackReasons: Bool {
get {
defaults.object(forKey: fallbackReasonsKey) as? Bool ?? true
}
set (reasons) {
defaults.set(reasons, forKey: fallbackReasonsKey)
}
}
static var darkPopUps: Bool {
get {
@@ -0,0 +1,8 @@
import Foundation
@objc protocol SPTEncoreAttributedString {
func initWithString(_ string: String, typeStyle: Any, attributes: Any) -> SPTEncoreAttributedString
func text() -> String
func typeStyle() -> Any
func attributes() -> SPTEncoreAttributes
}
@@ -0,0 +1,7 @@
import UIKit
@objc protocol SPTEncoreAttributes {
func `init`(_: (SPTEncoreAttributes) -> Void) -> SPTEncoreAttributes
func foregroundColor() -> UIColor
func setForegroundColor(_ color: UIColor)
}
@@ -0,0 +1,6 @@
import Foundation
@objc protocol SPTEncoreLabel {
func text() -> NSArray
func setText(_ text: NSArray)
}
@@ -9,4 +9,4 @@ import Foundation
@objc enum ClickState: Int {
case primary
case secondary
}
}
@@ -4,4 +4,4 @@ import Foundation
static func shared() -> SPTEncorePopUpPresenter
func presentPopUp(_ popUp: SPTEncorePopUpDialog)
func dismissPopupWithAnimate(_ animate: Bool, clearQueue: Bool, completion: Any?)
}
}