1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-14 09:45:00 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/Extension/MastodonVisibility+Image.swift
2023-02-16 16:34:02 +01:00

21 lines
614 B
Swift

// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import UIKit
import CoreDataStack
import MastodonAsset
extension MastodonVisibility {
public var image: UIImage {
let asset: ImageAsset
switch self {
case .public: asset = Asset.Scene.Compose.earth
case .unlisted: asset = Asset.Scene.Compose.people
case .private: asset = Asset.Scene.Compose.peopleAdd
case .direct: asset = Asset.Scene.Compose.mention
case ._other: asset = Asset.Scene.Compose.questionmarkCircle
}
return asset.image.withRenderingMode(.alwaysTemplate)
}
}