Skip to content

Commit

Permalink
🐛 fixed preview icon status
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Dec 11, 2023
1 parent a51fdfc commit 0799ded
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Mac/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,11 @@ class ViewController:
return
}

// 防止预览情况下新建preview标没有修改过来
UserDefaultsManagement.preview = false
DispatchQueue.main.async { [weak self] in
self?.previewButton.state = UserDefaultsManagement.preview ? .on : .off
}

editArea.markdownView?.removeFromSuperview()
editArea.markdownView = nil
Expand All @@ -1980,6 +1984,7 @@ class ViewController:
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
vc.titleLabel.editModeOn()
}

updateTable {
DispatchQueue.main.async {
if let index = self.notesTableView.getIndex(note) {
Expand All @@ -1988,6 +1993,7 @@ class ViewController:
}
}
}

Analytics.trackEvent("MiaoYan NewNote")
}

Expand Down

0 comments on commit 0799ded

Please sign in to comment.