mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-12 16:46:32 +01:00
6b32e5e4aa
* 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)
22 lines
716 B
Swift
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)
|
|
}
|
|
}
|