소스 검색

Handle rename messages in RichDocuments.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
Ivan Sein 5 년 전
부모
커밋
de9d784675
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      iOSClient/Viewer/NCViewerRichdocument.swift

+ 8 - 0
iOSClient/Viewer/NCViewerRichdocument.swift

@@ -141,6 +141,14 @@ class NCViewerRichdocument: WKWebView, WKNavigationDelegate, WKScriptMessageHand
                         })
                         
                     }
+                } else if param["MessageName"] as? String == "fileRename" {
+                    if let values = param["Values"] as? Dictionary<AnyHashable,Any> {
+                        guard let newName = values["NewName"] as? String else {
+                            return
+                        }
+                        metadata.fileName = newName
+                        metadata.fileNameView = newName
+                    }
                 }
             }