2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

27 lines
517 B
Swift

//
// Preference+Theme.swift
//
//
// Created by MainasuK on 2022-4-13.
//
import UIKit
import MastodonExtension
public enum ThemeName: String, CaseIterable {
case system
case mastodon
}
extension UserDefaults {
@objc public dynamic var currentThemeNameRawValue: String {
get {
register(defaults: [#function: ThemeName.mastodon.rawValue])
return string(forKey: #function) ?? ThemeName.mastodon.rawValue
}
set { self[#function] = newValue }
}
}