remove the confirmation sheet cos it doesnt work

cant download empty packs
This commit is contained in:
Nihaal Sharma committed 2026-07-01 13:50:11 +01:00
1 parent 9b1773ce60
commit 78b55c2c90
2 files changed
+15 -16

No files matched your search

@@ -159,6 +159,7 @@ struct EmojiPackDetailView: View {
} }
} }
} }
.disabled(pack.items.isEmpty)
.tint(allDownloaded ? .red : .accentColor) .tint(allDownloaded ? .red : .accentColor)
} }
} }
@@ -71,23 +71,21 @@ struct EmojiPackManager: View {
ToolbarSpacer() ToolbarSpacer()
} }
// if editMode?.wrappedValue.isEditing ?? false { ToolbarItem(placement: .topBarLeading) {
ToolbarItem(placement: .topBarLeading) { Button("", systemImage: "trash") {
Button("", systemImage: "trash") { showDeleteAlert.toggle()
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")
}
} }
// } .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")
// }
}
} }
} }
} }
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.