Jelajahi Sumber

fix crash

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 1 tahun lalu
induk
melakukan
5db510b986
1 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 6 1
      iOSClient/Share/NCSharePaging.swift

+ 6 - 1
iOSClient/Share/NCSharePaging.swift

@@ -89,7 +89,12 @@ class NCSharePaging: UIViewController {
 
         pagingViewController.dataSource = self
         pagingViewController.delegate = self
-        pagingViewController.select(index: page.rawValue)
+
+        if page.rawValue < NCBrandOptions.NCInfoPagingTab.allCases.count {
+            pagingViewController.select(index: page.rawValue)
+        } else {
+            pagingViewController.select(index: 0)
+        }
 
         (pagingViewController.view as? NCSharePagingView)?.setupConstraints()
         pagingViewController.reloadMenu()