Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
vincode-io committed Dec 27, 2023
2 parents 82b2e0f + c4a55f0 commit 1feb316
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions Zavala/Documents/DocumentsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ class DocumentsViewController: UICollectionViewController, MainControllerIdentif
}
}

func createOutline(animated: Bool) {
guard let document = createOutlineDocument(title: "") else { return }
loadDocuments(animated: animated) {
self.selectDocument(document, isNew: true, animated: true)
}
}

func createOutlineDocument(title: String) -> Document? {
guard let documentContainers = documentContainers,
let account = documentContainers.uniqueAccount else { return nil }
Expand Down Expand Up @@ -259,10 +266,7 @@ class DocumentsViewController: UICollectionViewController, MainControllerIdentif
}

@objc func createOutline() {
guard let document = createOutlineDocument(title: "") else { return }
loadDocuments(animated: true) {
self.selectDocument(document, isNew: true, animated: true)
}
createOutline(animated: true)
}

@objc func importOPML() {
Expand Down
2 changes: 1 addition & 1 deletion Zavala/Editor/EditorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2399,7 +2399,7 @@ private extension EditorViewController {

func moveCursorToTitleOnNew() {
if isOutlineNewFlag {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.6) {
self.moveCursorToTitle()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Zavala/MainSplitViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class MainSplitViewController: UISplitViewController, MainCoordinator {

@objc func createOutline() {
selectDefaultDocumentContainerIfNecessary() {
self.documentsViewController?.createOutline()
self.documentsViewController?.createOutline(animated: false)
}
}

Expand Down
2 changes: 1 addition & 1 deletion xcconfig/Zavala_target_common.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
MARKETING_VERSION = 2.3
CURRENT_PROJECT_VERSION = 61
CURRENT_PROJECT_VERSION = 62
SWIFT_OBJC_BRIDGING_HEADER = AppKitPlugin/BridgingHeader.h

0 comments on commit 1feb316

Please sign in to comment.