From 78b55c2c90788fa98bda4ccac8ad7d8e0cb725da Mon Sep 17 00:00:00 2001 From: Nihaal Sharma <69979447+neon443@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:50:11 +0100 Subject: [PATCH] remove the confirmation sheet cos it doesnt work cant download empty packs --- .../EmojiPacks/EmojiPackDetailView.swift | 1 + .../SwiftUI/EmojiPacks/EmojiPackManager.swift | 30 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift index 2bc708a..99535d3 100644 --- a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift +++ b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift @@ -159,6 +159,7 @@ struct EmojiPackDetailView: View { } } } + .disabled(pack.items.isEmpty) .tint(allDownloaded ? .red : .accentColor) } } diff --git a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift index 7778173..91d0895 100644 --- a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift +++ b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift @@ -71,23 +71,21 @@ struct EmojiPackManager: View { ToolbarSpacer() } -// if editMode?.wrappedValue.isEditing ?? false { - ToolbarItem(placement: .topBarLeading) { - Button("", systemImage: "trash") { - showDeleteAlert.toggle() - } - .disabled(selection.isEmpty) - .confirmationDialog("These items will be deleted immediately", isPresented: $showDeleteAlert) { - Button("Delete \(selection.count) pack\(selection.count.plural)", role: .destructive) { - for pack in selection { - hoarder.removeEmojiPack(pack) - } - } - } message: { - Text("This action cannot be undone") - } + ToolbarItem(placement: .topBarLeading) { + Button("", systemImage: "trash") { + showDeleteAlert.toggle() } -// } + .disabled(selection.isEmpty) +// .confirmationDialog("These items will be deleted immediately", isPresented: $showDeleteAlert) { +// Button("Delete \(selection.count) pack\(selection.count.plural)", role: .destructive) { +// for pack in selection { +// hoarder.removeEmojiPack(pack) +// } +// } +// } message: { +// Text("This action cannot be undone") +// } + } } } }