mirror of
https://gitee.com/openharmony/applications_mms
synced 2024-11-22 23:29:41 +00:00
!163 jscrash of close\id\touchend
Merge pull request !163 from zhouhongli2023/master
This commit is contained in:
commit
8072d2bf01
@ -1495,8 +1495,8 @@ export default class ConversationController {
|
||||
let tempWeekId = item.week?.id;
|
||||
if (list.length > 0) {
|
||||
item.dateShow =
|
||||
(tempDateId != (list[list.length-1]).date.id)
|
||||
&& (tempWeekId != (list[list.length-1]).week.id)
|
||||
(tempDateId != (list[list.length-1]).date?.id)
|
||||
&& (tempWeekId != (list[list.length-1]).week?.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,18 +367,23 @@ export default class ConversationListController {
|
||||
}
|
||||
|
||||
touchEnd(event: GestureEvent, index: number) {
|
||||
HiLog.i(TAG, 'touchEnd, index: ' + index);
|
||||
if (this.isMultipleSelectState) {
|
||||
return;
|
||||
}
|
||||
// offsetX indicates the offset. The value range is [-operateBtnW, 0].
|
||||
let offsetX = event.offsetX;
|
||||
let item = this.messageList[this.itemTouchedIdx];
|
||||
if (offsetX + (this.operateBtnW / 2) >= 0) {
|
||||
this.setListItemTransX(0);
|
||||
item.isDelShow = false;
|
||||
} else {
|
||||
this.setListItemTransX(0 - this.operateBtnW);
|
||||
item.isDelShow = true;
|
||||
try {
|
||||
let offsetX = event.offsetX;
|
||||
let item = this.messageList[this.itemTouchedIdx];
|
||||
if (offsetX + (this.operateBtnW / 2) >= 0) {
|
||||
this.setListItemTransX(0);
|
||||
item.isDelShow = false;
|
||||
} else {
|
||||
this.setListItemTransX(0 - this.operateBtnW);
|
||||
item.isDelShow = true;
|
||||
}
|
||||
} catch (error) {
|
||||
HiLog.e(TAG, 'touchEnd: ' + JSON.stringify(error));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ export abstract class WorkerWrapper {
|
||||
HiLog.i(TAG, `${this.getWorkerType()} worker close!`);
|
||||
if (this.mWorker != null) {
|
||||
HiLog.i(TAG, 'this mWorker is right');
|
||||
this.mWorker.terminate();
|
||||
this.mWorker?.terminate();
|
||||
}
|
||||
this.mWorker = null;
|
||||
this.callBacks.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user