Browse Source

Use app store link

Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Milen Pivchev 1 year ago
parent
commit
c3a181bf88

+ 2 - 7
iOSClient/More/Cells/NCMoreAppSuggestionsCell.swift

@@ -16,8 +16,6 @@ class NCMoreAppSuggestionsCell: BaseNCMoreCell {
 
     static let reuseIdentifier = "NCMoreAppSuggestionsCell"
 
-    weak var delegate: NCMoreAppSuggestionsCellDelegate?
-
     static func fromNib() -> UINib {
         return UINib(nibName: "NCMoreAppSuggestionsCell", bundle: nil)
     }
@@ -54,10 +52,7 @@ class NCMoreAppSuggestionsCell: BaseNCMoreCell {
     }
 
     @objc func moreAppsTapped() {
-        delegate?.moreAppsTapped()
+        guard let url = URL(string: NCGlobal.shared.moreAppsUrl) else { return }
+        UIApplication.shared.open(url)
     }
 }
-
-protocol NCMoreAppSuggestionsCellDelegate: AnyObject {
-    func moreAppsTapped()
-}

+ 0 - 11
iOSClient/More/NCMore.swift

@@ -361,8 +361,6 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         } else if section.type == .moreApps {
             guard let cell = tableView.dequeueReusableCell(withIdentifier: NCMoreAppSuggestionsCell.reuseIdentifier, for: indexPath) as? NCMoreAppSuggestionsCell else { return UITableViewCell() }
 
-            cell.delegate = self
-
             return cell
         } else {
             guard let cell = tableView.dequeueReusableCell(withIdentifier: CCCellMore.reuseIdentifier, for: indexPath) as? CCCellMore else { return UITableViewCell() }
@@ -449,12 +447,3 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         }
     }
 }
-
-extension NCMore: NCMoreAppSuggestionsCellDelegate {
-    func moreAppsTapped() {
-        guard let url = URL(string: NCGlobal.shared.moreAppsUrl) else { return }
-        let safariViewController = SFSafariViewController(url: url)
-
-        present(safariViewController, animated: true, completion: nil)
-    }
-}

+ 1 - 1
iOSClient/NCGlobal.swift

@@ -471,7 +471,7 @@ class NCGlobal: NSObject {
     let notesSchemeUrl                                          = "nextcloudnotes://"
     let talkAppStoreUrl                                         = "https://apps.apple.com/de/app/nextcloud-talk/id1296825574"
     let notesAppStoreUrl                                        = "https://apps.apple.com/de/app/nextcloud-notes/id813973264"
-    let moreAppsUrl                                             = "https://www.apple.com/us/search/nextcloud?src=globalnav"
+    let moreAppsUrl                                             = "itms-apps://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=nextcloud"
 
     // SNAPSHOT PREVIEW
     let defaultSnapshotConfiguration = "DefaultPreviewConfiguration"