mastodon-ios/Mastodon/Preference/ThemePreference.swift

22 lines
439 B
Swift
Raw Normal View History

2021-07-05 10:07:17 +02:00
//
// ThemePreference.swift
// Mastodon
//
// Created by MainasuK Cirno on 2021-7-5.
//
import UIKit
2021-07-19 11:12:45 +02:00
import MastodonExtension
2021-07-05 10:07:17 +02:00
extension UserDefaults {
@objc dynamic var currentThemeNameRawValue: String {
get {
register(defaults: [#function: ThemeName.mastodon.rawValue])
return string(forKey: #function) ?? ThemeName.mastodon.rawValue
}
set { self[#function] = newValue }
}
}