1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-12 16:46:32 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/Extension/MastodonVisibility+Image.swift
Nathan Mattes 6b32e5e4aa
Re-enable option to post unlisted/"Quiet public" (#1271)
* Add unlisted as option to post (#250)

* Replace menu-icons with SF Symbols to match other platforms (#250)

* Replace earth with SF-symbol (#250)

* Use SF Symbols for visibility (#250)
2024-04-12 10:58:18 +02:00

22 lines
716 B
Swift

// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import UIKit
import CoreDataStack
import MastodonAsset
import MastodonSDK
extension MastodonVisibility {
public var image: UIImage {
let asset: UIImage
switch self {
case .public: asset = Mastodon.Entity.Status.Visibility.public.image
case .unlisted: asset = Mastodon.Entity.Status.Visibility.unlisted.image
case .private: asset = Mastodon.Entity.Status.Visibility.private.image
case .direct: asset = Mastodon.Entity.Status.Visibility.direct.image
case ._other: asset = Mastodon.Entity.Status.Visibility._other("").image
}
return asset.withRenderingMode(.alwaysTemplate)
}
}