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

+2 -2
View File
@@ -261,7 +261,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
DEVELOPMENT_TEAM = 2P4CP47H76; DEVELOPMENT_TEAM = 2P4CP47H76;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@@ -293,7 +293,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
DEVELOPMENT_TEAM = 2P4CP47H76; DEVELOPMENT_TEAM = 2P4CP47H76;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
+4 -1
View File
@@ -40,7 +40,10 @@ struct Pocket_PosterApp: App {
.onOpenURL(perform: { url in .onOpenURL(perform: { url in
// Download URL // Download URL
if url.absoluteString.starts(with: "pocketposter://download") { 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.") UIApplication.shared.alert(title: "Max Tendies Reached", body: "You can only apply \(PosterBoardManager.MaxTendies) descriptors.")
} else { } else {
downloadURL = url.absoluteString.replacingOccurrences(of: "pocketposter://download?url=", with: "") downloadURL = url.absoluteString.replacingOccurrences(of: "pocketposter://download?url=", with: "")