From 9c9b788a917f7aa9483ef02f9291df2c6dcdf780 Mon Sep 17 00:00:00 2001 From: ned Date: Mon, 8 Mar 2021 15:50:02 +0100 Subject: [PATCH] small fixes --- appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift | 1 + appdb/Tabs/Featured/See All/SeeAll.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift b/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift index 134e6f88..0cf40bd4 100644 --- a/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift +++ b/appdb/Tabs/Downloads/Downloading/IPAWebViewController.swift @@ -269,6 +269,7 @@ extension IPAWebViewController { extension IPAWebViewController: WKScriptMessageHandler { func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { guard let base64DataString = message.body as? String else { return } + guard base64DataString.starts(with: "data:application/octet-stream;base64,") else { return } // Before decoding we need to drop this: "data:application/octet-stream;base64," guard let dataDecoded = Data(base64Encoded: String(base64DataString.dropFirst(37))) else { return } let filename: String = Global.randomString(length: 15) + "-MEGA.ipa" diff --git a/appdb/Tabs/Featured/See All/SeeAll.swift b/appdb/Tabs/Featured/See All/SeeAll.swift index 42a06c3f..2c93478f 100644 --- a/appdb/Tabs/Featured/See All/SeeAll.swift +++ b/appdb/Tabs/Featured/See All/SeeAll.swift @@ -110,7 +110,7 @@ class SeeAll: LoadingTableView { if Global.isIpad { // Add 'Dismiss' button for iPad let dismissButton = UIBarButtonItem(title: "Dismiss".localized(), style: .done, target: self, action: #selector(self.dismissAnimated)) - self.navigationItem.rightBarButtonItems = [dismissButton] + self.navigationItem.leftBarButtonItems = [dismissButton] } // Refresh action