Kurdtvs-Live-Kurdish-TV-Kur.../Mastodon/Preference/AppearancePreference.swift

39 lines
1010 B
Swift
Raw Normal View History

//
// AppearancePreference.swift
// Mastodon
//
// Created by MainasuK Cirno on 2021-4-26.
//
import UIKit
extension UserDefaults {
@objc dynamic var customUserInterfaceStyle: UIUserInterfaceStyle {
get {
register(defaults: [#function: UIUserInterfaceStyle.unspecified.rawValue])
return UIUserInterfaceStyle(rawValue: integer(forKey: #function)) ?? .unspecified
}
set { self[#function] = newValue.rawValue }
}
@objc dynamic var preferredStaticAvatar: Bool {
get {
2021-07-19 11:12:45 +02:00
// default false
// without set register to profile timeline performance
return bool(forKey: #function)
}
set { self[#function] = newValue }
}
2021-07-23 13:33:05 +02:00
@objc dynamic var preferredStaticEmoji: Bool {
get {
// default false
// without set register to profile timeline performance
return bool(forKey: #function)
}
set { self[#function] = newValue }
}
}