File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020// SOFTWARE.
2121
22+ /// An object that represents category of emojis.
2223struct Category : Decodable {
23- let id : CategoryType
24+ /// Type-safe category type.
25+ let type : CategoryType
26+ /// Identifiers of emojis.
2427 let emojis : [ String ]
28+
29+ enum CodingKeys : String , CodingKey {
30+ case type = " id "
31+ case emojis
32+ }
2533}
2634
27- /// Describes types of emoji categories.
35+ /// Type-safe representation of emoji categories.
2836enum CategoryType : String , Decodable , CaseIterable {
2937 case people
3038 case nature
Original file line number Diff line number Diff line change 1919// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020// SOFTWARE.
2121
22+ /// An object that represents emoji.
2223struct Emoji : Decodable {
23- let id , name : String
24+ /// Emoji identifier.
25+ let id : String
26+ /// Name of an emoji.
27+ let name : String
28+ /// Keywords for an emoji.
2429 let keywords : [ String ]
30+ /// Skin tones.
2531 let skins : [ Skin ]
32+ /// Version in which the emoji appeared.
2633 let version : Double
27- let emoticons : [ String ] ?
2834}
Original file line number Diff line number Diff line change 1919// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020// SOFTWARE.
2121
22+ /// An object that represents set of emojis.
2223struct EmojiSet : Decodable {
24+ /// Emoji categories.
2325 let categories : [ Category ]
26+ /// Emojis dictionary. Key is the name (id) of emoji.
2427 let emojis : [ String : Emoji ]
28+ /// Aliases of keywords for emojis.
2529 let aliases : [ String : String ]
2630}
Original file line number Diff line number Diff line change 1919// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020// SOFTWARE.
2121
22+ /// An object that represents skin tones for emojis.
2223struct Skin : Decodable {
24+ /// Unicode.
2325 let unified : String
26+ /// Emoji as symbol. For example: 😄
2427 let native : String
2528}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ final class EmojiPickerViewModel: EmojiPickerViewModelProtocol {
7575
7676 func sectionHeaderViewModel( for section: Int ) -> String {
7777 return NSLocalizedString (
78- emojiSet. categories [ section] . id . rawValue,
78+ emojiSet. categories [ section] . type . rawValue,
7979 bundle: . module,
8080 comment: " "
8181 )
You can’t perform that action at this time.
0 commit comments