!106 #I5UI1A 每隔3秒保存一次,当内容很大时出现anr

Merge pull request !106 from tangyiqiang/master
This commit is contained in:
openharmony_ci
2022-10-08 10:10:40 +00:00
committed by Gitee
3 changed files with 12 additions and 0 deletions
@@ -66,6 +66,10 @@ export struct NoteContent {
callbackScheduledSave: (html) => {
LogUtil.info(TAG, 'callbackScheduledSave')
if (this.selectedNoteData.content_text == html) {
LogUtil.info(TAG, 'callbackScheduledSave the same value return')
return;
}
this.selectedNoteData.content_text = html
this.selectedNoteData.modified_time = new Date().getTime()
// updata note image
@@ -94,6 +94,10 @@ export struct NoteContentComp {
callbackScheduledSave: (html) => {
LogUtil.info(TAG, 'callbackScheduledSave')
if (this.selectedNoteData.content_text == html) {
LogUtil.info(TAG, 'callbackScheduledSave the same value return')
return;
}
this.selectedNoteData.content_text = html
this.selectedNoteData.modified_time = new Date().getTime()
// updata note image
@@ -73,6 +73,10 @@ export struct NoteContentCompPortrait {
callbackScheduledSave: (html) => {
LogUtil.info(TAG, 'callbackScheduledSave')
if (this.selectedNoteData.content_text == html) {
LogUtil.info(TAG, 'callbackScheduledSave the same value return')
return;
}
this.selectedNoteData.content_text = html
this.selectedNoteData.modified_time = new Date().getTime()
// updata note image