2022-01-27 14:23:39 +01:00
|
|
|
//
|
|
|
|
// MastodonEmojiContainer.swift
|
|
|
|
// MastodonEmojiContainer
|
|
|
|
//
|
|
|
|
// Created by Cirno MainasuK on 2021-9-3.
|
|
|
|
// Copyright © 2021 Twidere. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import MastodonSDK
|
|
|
|
import CoreDataStack
|
|
|
|
|
|
|
|
public protocol MastodonEmojiContainer {
|
2024-01-05 12:30:36 +01:00
|
|
|
var emojis: [Mastodon.Entity.Emoji] { get }
|
2022-01-27 14:23:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
extension MastodonEmojiContainer {
|
|
|
|
public var mastodonEmojis: [MastodonEmoji] {
|
2024-01-05 12:30:36 +01:00
|
|
|
return emojis.map { MastodonEmoji(emoji: $0) }
|
2022-01-27 14:23:39 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension Mastodon.Entity.Account: MastodonEmojiContainer { }
|
|
|
|
extension Mastodon.Entity.Status: MastodonEmojiContainer { }
|
2023-03-02 11:06:13 +01:00
|
|
|
extension Mastodon.Entity.StatusEdit: MastodonEmojiContainer { }
|