diff --git "a/appdb/Resources/\342\200\242 MessagesFactory/MessagesFactory.swift" "b/appdb/Resources/\342\200\242 MessagesFactory/MessagesFactory.swift" index b3057d9e..fc349afd 100644 --- "a/appdb/Resources/\342\200\242 MessagesFactory/MessagesFactory.swift" +++ "b/appdb/Resources/\342\200\242 MessagesFactory/MessagesFactory.swift" @@ -20,7 +20,16 @@ struct Messages { func getConfig(_ context: SwiftMessages.PresentationContext? = nil) -> SwiftMessages.Config { var config = SwiftMessages.Config() - config.presentationStyle = Preferences.adBannerHeight > 0 ? .top : .bottom + switch context { + case .viewController(let vc): + if vc is FulfilledWishes || vc is NewWishes { + config.presentationStyle = .bottom + } else { + config.presentationStyle = Preferences.adBannerHeight > 0 ? .top : .bottom + } + default: + config.presentationStyle = Preferences.adBannerHeight > 0 ? .top : .bottom + } config.presentationContext = context ?? .automatic config.dimMode = .none return config diff --git a/appdb/Startup/Extensions.swift b/appdb/Startup/Extensions.swift index 558beade..c7dd0293 100644 --- a/appdb/Startup/Extensions.swift +++ b/appdb/Startup/Extensions.swift @@ -62,6 +62,7 @@ extension String { case "ERROR_REQUEST_STATUS_CANT_BE_SET": return "This request status can't be set.".localized() case "ERROR_SUCH_REQUEST_EXISTS": return "Such request already exists. But we have added you as requester as well.".localized() case "ERROR_SUCH_VERSION_EXISTS_AND_LINKS_AVAILABLE": return "Such version is already on appdb and it has links available.".localized() + case "ERROR_INVALID_APPSTORE_URL": return "Invalid AppStore URL.".localized() case "JSON could not be serialized because of error:\nThe data couldn’t be read because it isn’t in the correct format.": return "An error has occurred: malformed JSON".localized() default: return self.localized() } diff --git a/appdb/Tabs/Featured/Wishes/Wishes.swift b/appdb/Tabs/Featured/Wishes/Wishes.swift index 559e3180..f0e373c8 100644 --- a/appdb/Tabs/Featured/Wishes/Wishes.swift +++ b/appdb/Tabs/Featured/Wishes/Wishes.swift @@ -162,9 +162,9 @@ extension Wishes { guard let url = URL(string: text) else { return } API.createPublishRequest(appStoreUrl: url.absoluteString) { error in if let error = error { - Messages.shared.showError(message: error, context: Global.isIpad ? .viewController(self) : nil) + Messages.shared.showError(message: error.prettified, context: .viewController(self)) } else { - Messages.shared.showSuccess(message: "App has been requested successfully!".localized(), context: Global.isIpad ? .viewController(self) : nil) + Messages.shared.showSuccess(message: "App has been requested successfully!".localized(), context: .viewController(self)) } } })