|
@@ -2097,6 +2097,15 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
|
|
|
cell?.operationIv.image = NSImage(named: "KMImageNameBotaNoteStateRejected")
|
|
|
}
|
|
|
|
|
|
+ if let con = data.replyModel?.replyAnno?.contents, con.isEmpty == false {
|
|
|
+ cell?.inputTextF.stringValue = con
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ self.view.window?.makeFirstResponder(cell?.inputTextF)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ cell?.inputTextF.stringValue = ""
|
|
|
+ }
|
|
|
+
|
|
|
cell?.updateUI(expand: data.isExpand, animated: data.animated)
|
|
|
data.animated = false
|
|
|
|
|
@@ -2115,6 +2124,17 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+ if let con = data.replyModel?.replyAnno?.contents, con.isEmpty == false {
|
|
|
+ let model = data.replyModel
|
|
|
+ model?.replyAnno?.contents = content
|
|
|
+ model?.replyAnno?.setUserName(KMPreference.shared.author)
|
|
|
+ model?.replyAnno?.setModificationDate(Date())
|
|
|
+ self?.noteOutlineView.reloadData()
|
|
|
+
|
|
|
+ // 置空编辑状态
|
|
|
+ data.replyModel = nil
|
|
|
+ return
|
|
|
+ }
|
|
|
if let replyAnno = self?.noteReplyHanddler.createReplyAnnotation(data.anno, content: content, userName: KMPreference.shared.author) {
|
|
|
// self?.reloadAnnotation()
|
|
|
let model = KMBotaAnnotationReplyModel()
|
|
@@ -2151,7 +2171,7 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
|
|
|
cell?.contentLabel.stringValue = data.replyAnno?.contents ?? ""
|
|
|
cell?.itemClick = { [weak self] idx, params in
|
|
|
if idx == 1 { // 更多
|
|
|
- self?.noteReplyHanddler.showReplyMorePopView(sender: params.first as! NSView, anno: data.replyAnno)
|
|
|
+ self?.noteReplyHanddler.showReplyMorePopView(sender: params.first as! NSView, replyModel: data)
|
|
|
}
|
|
|
}
|
|
|
return cell
|