Kurdtvs-Live-Kurdish-TV-Kur.../Mastodon/Extension/CoreDataStack/Setting.swift

25 lines
491 B
Swift
Raw Normal View History

//
// Setting.swift
// Mastodon
//
// Created by MainasuK Cirno on 2021-4-25.
//
import Foundation
import CoreDataStack
import MastodonSDK
extension Setting {
// var appearance: SettingsItem.AppearanceMode {
// return SettingsItem.AppearanceMode(rawValue: appearanceRaw) ?? .automatic
// }
var activeSubscription: Subscription? {
return (subscriptions ?? Set())
.sorted(by: { $0.activedAt > $1.activedAt })
.first
}
}