diff --git a/StickerSlack/Emoji/Categorisation/EmojiPack.swift b/StickerSlack/Emoji/Categorisation/EmojiPack.swift index 400f836..e229842 100644 --- a/StickerSlack/Emoji/Categorisation/EmojiPack.swift +++ b/StickerSlack/Emoji/Categorisation/EmojiPack.swift @@ -12,13 +12,11 @@ import UniformTypeIdentifiers struct EmojiPack: Identifiable, Codable, Equatable, Hashable { var id: UUID var name: String - var description: String var items: [String] - init(id: UUID, name: String, description: String, items: [String]) { + init(id: UUID, name: String, items: [String]) { self.id = id self.name = name - self.description = description self.items = items } @@ -54,7 +52,7 @@ struct EmojiPack: Identifiable, Codable, Equatable, Hashable { case "name": pack.name = value case "description": - pack.description = value + print(value) case "items": if let data = Data(base64Encoded: value), let decoded = try? JSONDecoder().decode([String].self, from: data) { @@ -126,7 +124,6 @@ struct EmojiPack: Identifiable, Codable, Equatable, Hashable { let queries: [URLQueryItem] = [ .init(name: "id", value: id.uuidString), .init(name: "name", value: name), - .init(name: "description", value: description), .init(name: "items", value: data.base64EncodedString()) ] @@ -154,7 +151,6 @@ extension EmojiPack { EmojiPack( id: UUID(), name: "New Pack", - description: "Created on \(Date().formatted())", items: items ) } diff --git a/StickerSlack/Extensions/TestStructures.swift b/StickerSlack/Extensions/TestStructures.swift index b3c358c..1b99e7d 100644 --- a/StickerSlack/Extensions/TestStructures.swift +++ b/StickerSlack/Extensions/TestStructures.swift @@ -125,7 +125,6 @@ extension EmojiPack { EmojiPack( id: UUID(), name: "test pack", - description: "neon443's debug emoji pack", items: [ "pf", "heavysob", @@ -134,36 +133,36 @@ extension EmojiPack { "loll", "bleh", "uhh", -// "communist" - "communist", - "ufahh", - "uhafh", - "uhgfh", - "uoohh", - "ujyhgghh", - "uhfgh", - "ujg3thh", - "uyhh", - "ughhhh", - "uvhh", - "ujrg3tjthhg", - "ujherh", - "uxhggrh", - "ushgrq3geallh", - "u hrgqh", - "ujjjjjyhgh", - "uherhh", - "uhhesh", - "hhreruhgh", - "u hffh", - "uh h", - "uaugerhh", - "u4h3h", - "u4hh", - "ueyhh ", - "u erthh", - "uhujh", - "ujkkkkhh" + "communist" +// "communist", +// "ufahh", +// "uhafh", +// "uhgfh", +// "uoohh", +// "ujyhgghh", +// "uhfgh", +// "ujg3thh", +// "uyhh", +// "ughhhh", +// "uvhh", +// "ujrg3tjthhg", +// "ujherh", +// "uxhggrh", +// "ushgrq3geallh", +// "u hrgqh", +// "ujjjjjyhgh", +// "uherhh", +// "uhhesh", +// "hhreruhgh", +// "u hffh", +// "uh h", +// "uaugerhh", +// "u4h3h", +// "u4hh", +// "ueyhh ", +// "u erthh", +// "uhujh", +// "ujkkkkhh" ] ) } diff --git a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift index 6856e8d..c7127c7 100644 --- a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift +++ b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift @@ -14,8 +14,7 @@ struct EmojiPackDetailView: View { @State var edit: Bool = false @State var editName: Bool = false - @State var editDescription: Bool = false - + @State var downloading: Bool = false @State var showAdder: Bool = false @@ -46,17 +45,6 @@ struct EmojiPackDetailView: View { TextField("", text: $pack.name) } - Button() { - editDescription.toggle() - } label: { - Text(pack.description.isEmpty ? "Description" : pack.description) - .foregroundStyle(edit ? Color.accentColor : .primary) - } - .disabled(!edit) - .alert("Edit Description", isPresented: $editDescription) { - TextField("", text: $pack.description) - } - if pack.items.isEmpty { EmptyCollectionView( title: "No Emoji", diff --git a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackPreview.swift b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackPreview.swift index ad1b0af..c55cba4 100644 --- a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackPreview.swift +++ b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackPreview.swift @@ -22,9 +22,6 @@ struct EmojiPackPreview: View { .foregroundStyle(.primary) .font(.title) - Text(pack.description.isEmpty ? "Description" : pack.description) - .foregroundStyle(.primary) - if pack.items.isEmpty { EmptyCollectionView( title: "No Emoji", diff --git a/StickerSlack/UIKit/EmojiPackDetailViewController.swift b/StickerSlack/UIKit/EmojiPackDetailViewController.swift index c2f91a1..eb14e30 100644 --- a/StickerSlack/UIKit/EmojiPackDetailViewController.swift +++ b/StickerSlack/UIKit/EmojiPackDetailViewController.swift @@ -49,7 +49,9 @@ class EmojiPackDetailViewController: UINavigationController { target: nil, action: nil ) - collectionView.navigationItem.title = pack.name +// collectionView.navigationItem.title = pack.name + + collectionView.navigationItem.titleView = UIImageView(image: UIImage(systemName: "square.and.arrow.up.circle.fill")) // collectionView.toolbarItems = [editButton, downloadButton, shareButton] collectionView.navigationItem.leftBarButtonItems = [editButton, adderSheetButton] collectionView.navigationItem.rightBarButtonItems = [shareButton, downloadButton]