From 3348e971eb8802f907e9ed733e1d77f985eae9e8 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Tue, 28 Apr 2026 12:21:55 +0100 Subject: [PATCH] some stuff --- StickerSlack/UIKit/CollectionView/EmojiCollectionView.swift | 6 +++--- .../UIKit/CollectionView/PlainEmojiCollectionViewCell.swift | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/StickerSlack/UIKit/CollectionView/EmojiCollectionView.swift b/StickerSlack/UIKit/CollectionView/EmojiCollectionView.swift index 8a55183..876fd45 100644 --- a/StickerSlack/UIKit/CollectionView/EmojiCollectionView.swift +++ b/StickerSlack/UIKit/CollectionView/EmojiCollectionView.swift @@ -21,8 +21,7 @@ struct EmojiCollectionView: UIViewRepresentable { func makeUIView(context: Context) -> UICollectionView { let collectionView = context.coordinator as UICollectionViewController collectionView.collectionView.register(PlainEmojiCollectionViewCell.self, forCellWithReuseIdentifier: "plain") - collectionView.collectionView.register(EmojiCollectionViewCell.self, forCellWithReuseIdentifier: "plainWithMenu") - collectionView.collectionView.register(EmojiCollectionViewCell.self, forCellWithReuseIdentifier: "full") + collectionView.collectionView.register(EmojiCollectionViewCell.self, forCellWithReuseIdentifier: "full") collectionView.collectionView.dataSource = context.coordinator collectionView.collectionView.delegate = context.coordinator return collectionView.collectionView @@ -163,11 +162,12 @@ struct EmojiCollectionView: UIViewRepresentable { let share = UIAction(title: "Share", image: UIImage(systemName: "square.and.arrow.up")) { action in } - let delete = UIAction(title: "Delete", image: UIImage(systemName: "plus")) { action in + let delete = UIAction(title: "Delete", image: UIImage(systemName: "trash")) { action in Task.detached { await self.hoarder.delete(emoji: self.hoarder.trie.dict[emojiName]) } } + delete.attributes.update(with: .destructive) return UIMenu(title: emojiName, children: [copyName, copyImage, share, delete]) } } diff --git a/StickerSlack/UIKit/CollectionView/PlainEmojiCollectionViewCell.swift b/StickerSlack/UIKit/CollectionView/PlainEmojiCollectionViewCell.swift index db79c57..671ad62 100644 --- a/StickerSlack/UIKit/CollectionView/PlainEmojiCollectionViewCell.swift +++ b/StickerSlack/UIKit/CollectionView/PlainEmojiCollectionViewCell.swift @@ -50,7 +50,6 @@ class PlainEmojiCollectionViewCell: UICollectionViewCell { NSLayoutConstraint.activate( [ hostingController.view.topAnchor.constraint(equalTo: contentView.topAnchor), -// hostingController.view.bottomAnchor.constraint(equalTo: contentView.topAnchor, ), hostingController.view.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), hostingController.view.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), hostingController.view.heightAnchor.constraint(equalTo: hostingController.view.widthAnchor)