limit to only tendies files

This commit is contained in:
leminlimez committed 2025-06-08 11:39:49 -04:00
1 parent 2725c23cdd
commit eb280c5ecb
2 files changed
+6 -3

No files matched your search

+4 -1
View File
@@ -40,7 +40,10 @@ struct Pocket_PosterApp: App {
.onOpenURL(perform: { url in
// Download URL
if url.absoluteString.starts(with: "pocketposter://download") {
if selectedTendies.count >= PosterBoardManager.MaxTendies {
// prohibit to only tendies files
if !url.absoluteString.hasSuffix(".tendies") {
UIApplication.shared.alert(body: "Only .tendies files can be downloaded!")
} else if selectedTendies.count >= PosterBoardManager.MaxTendies {
UIApplication.shared.alert(title: "Max Tendies Reached", body: "You can only apply \(PosterBoardManager.MaxTendies) descriptors.")
} else {
downloadURL = url.absoluteString.replacingOccurrences(of: "pocketposter://download?url=", with: "")