|
@@ -378,7 +378,7 @@ import NCCommunication
|
|
|
|
|
|
if self.editorId == k_editor_text || self.editorId == k_editor_onlyoffice {
|
|
if self.editorId == k_editor_text || self.editorId == k_editor_onlyoffice {
|
|
|
|
|
|
- fileNameExtension = "md"
|
|
|
|
|
|
+ fileNameExtension = "md"
|
|
var customUserAgent: String?
|
|
var customUserAgent: String?
|
|
|
|
|
|
if self.editorId == k_editor_onlyoffice {
|
|
if self.editorId == k_editor_onlyoffice {
|
|
@@ -409,38 +409,32 @@ import NCCommunication
|
|
self.navigationItem.rightBarButtonItem?.isEnabled = true
|
|
self.navigationItem.rightBarButtonItem?.isEnabled = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
- // NOT ALIGNED getTemplatesRichdocuments
|
|
|
|
- if templates.count == 0 {
|
|
|
|
- let temp = NCCommunicationEditorTemplates()
|
|
|
|
-
|
|
|
|
- temp.identifier = ""
|
|
|
|
- if self.editorId == k_editor_text {
|
|
|
|
- temp.ext = "md"
|
|
|
|
- } else if self.editorId == k_editor_onlyoffice && self.typeTemplate == k_template_document {
|
|
|
|
- temp.ext = "docx"
|
|
|
|
- } else if self.editorId == k_editor_onlyoffice && self.typeTemplate == k_template_spreadsheet {
|
|
|
|
- temp.ext = "xlsx"
|
|
|
|
- } else if self.editorId == k_editor_onlyoffice && self.typeTemplate == k_template_presentation {
|
|
|
|
- temp.ext = "pptx"
|
|
|
|
- }
|
|
|
|
- temp.name = "Empty"
|
|
|
|
- temp.preview = ""
|
|
|
|
-
|
|
|
|
- self.listOfTemplate.append(temp)
|
|
|
|
-
|
|
|
|
- self.selectTemplate = temp
|
|
|
|
- self.fileNameExtension = temp.ext
|
|
|
|
- self.navigationItem.rightBarButtonItem?.isEnabled = true
|
|
|
|
|
|
+ if templates.count == 0 {
|
|
|
|
+ let temp = NCCommunicationEditorTemplates()
|
|
|
|
+
|
|
|
|
+ temp.identifier = ""
|
|
|
|
+ if self.editorId == k_editor_text {
|
|
|
|
+ temp.ext = "md"
|
|
|
|
+ } else if self.editorId == k_editor_onlyoffice && self.typeTemplate == k_template_document {
|
|
|
|
+ temp.ext = "docx"
|
|
|
|
+ } else if self.editorId == k_editor_onlyoffice && self.typeTemplate == k_template_spreadsheet {
|
|
|
|
+ temp.ext = "xlsx"
|
|
|
|
+ } else if self.editorId == k_editor_onlyoffice && self.typeTemplate == k_template_presentation {
|
|
|
|
+ temp.ext = "pptx"
|
|
}
|
|
}
|
|
|
|
+ temp.name = "Empty"
|
|
|
|
+ temp.preview = ""
|
|
|
|
+
|
|
|
|
+ self.listOfTemplate.append(temp)
|
|
|
|
|
|
- self.collectionView.reloadData()
|
|
|
|
-
|
|
|
|
- } else if errorCode != 0 {
|
|
|
|
- NCContentPresenter.shared.messageNotification("_error_", description: errorMessage, delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.error, errorCode: errorCode)
|
|
|
|
- } else {
|
|
|
|
- print("[LOG] It has been changed user during networking process, error.")
|
|
|
|
|
|
+ self.selectTemplate = temp
|
|
|
|
+ self.fileNameExtension = temp.ext
|
|
|
|
+ self.navigationItem.rightBarButtonItem?.isEnabled = true
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ self.collectionView.reloadData()
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|