mirror of
https://gitee.com/openharmony/applications_mms
synced 2024-11-26 17:30:42 +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,10 +367,12 @@ 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].
|
||||
try {
|
||||
let offsetX = event.offsetX;
|
||||
let item = this.messageList[this.itemTouchedIdx];
|
||||
if (offsetX + (this.operateBtnW / 2) >= 0) {
|
||||
@ -380,6 +382,9 @@ export default class ConversationListController {
|
||||
this.setListItemTransX(0 - this.operateBtnW);
|
||||
item.isDelShow = true;
|
||||
}
|
||||
} catch (error) {
|
||||
HiLog.e(TAG, 'touchEnd: ' + JSON.stringify(error));
|
||||
}
|
||||
}
|
||||
|
||||
setListItemTransX(transX) {
|
||||
|
@ -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