Browse Source

Fix pdfsearch pane number

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
9078809511
1 changed files with 2 additions and 1 deletions
  1. 2 1
      iOSClient/Viewer/NCViewerPDF/NCViewerPDFSearch.swift

+ 2 - 1
iOSClient/Viewer/NCViewerPDF/NCViewerPDFSearch.swift

@@ -81,7 +81,8 @@ class NCViewerPDFSearch: UITableViewController, UISearchBarDelegate, PDFDocument
         // }
 
         let pdfPage = pdfSelection.pages.first
-        cell.pageNumberLabel.text = NSLocalizedString("_scan_document_pdf_page_", comment: "") + ": " + (pdfPage?.label ?? "")
+        let pageNumber = pdfPage?.pageRef?.pageNumber ?? 0
+        cell.pageNumberLabel.text = NSLocalizedString("_scan_document_pdf_page_", comment: "") + ": " + String(pageNumber)
 
         let extendSelection = pdfSelection.copy() as! PDFSelection
         extendSelection.extend(atStart: 10)