From 5890a8058e4c907b7648533125cd520bf0c26039 Mon Sep 17 00:00:00 2001 From: liuxiyao Date: Thu, 1 Feb 2024 20:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=AF=9D=E8=AE=B0=E5=BD=95=E4=B8=8D?= =?UTF-8?q?=E8=B6=85=E8=BF=8750=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuxiyao --- entry/src/main/ets/model/calllog/CalllogModel.ets | 3 ++- .../ets/presenter/dialer/callRecord/CallRecordPresenter.ets | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/model/calllog/CalllogModel.ets b/entry/src/main/ets/model/calllog/CalllogModel.ets index 0be427f..eec5cbb 100644 --- a/entry/src/main/ets/model/calllog/CalllogModel.ets +++ b/entry/src/main/ets/model/calllog/CalllogModel.ets @@ -36,7 +36,7 @@ export default { HiLog.i(TAG, 'getAllCalls in:' + JSON.stringify(actionData)); CallLogRepository.getInstance().findAll(param.favorite, actionData, result => { let resultData = { - callLogList: [], missedList: [] + callLogList: [], missedList: [], callLogTotal: 0 }; if (ArrayUtil.isEmpty(result)) { HiLog.i(TAG, 'getAllCalls logMessage callLog resultSet is empty!'); @@ -47,6 +47,7 @@ export default { CallLogService.getInstance().setMergeRule(mergeRule) resultData.callLogList = CallLogService.getInstance().mergeCallLogs(result); resultData.missedList = CallLogService.getInstance().mergeMissedCalls(result); + resultData.callLogTotal = result.length; let numberList = this.getNumberList(resultData); this.queryContactsName(numberList, resultData, resultData => { callBack(resultData); diff --git a/entry/src/main/ets/presenter/dialer/callRecord/CallRecordPresenter.ets b/entry/src/main/ets/presenter/dialer/callRecord/CallRecordPresenter.ets index eef71a1..73dc3e5 100644 --- a/entry/src/main/ets/presenter/dialer/callRecord/CallRecordPresenter.ets +++ b/entry/src/main/ets/presenter/dialer/callRecord/CallRecordPresenter.ets @@ -234,7 +234,7 @@ export default class CallRecordPresenter { this.callLogIndex += this.callLogListPages[page-1]; this.missedListPages[page - 1] = data.missedList.length; this.missedIndex += this.missedListPages[page - 1]; - if (dateLength < limit) { + if (data.callLogTotal < limit) { HiLog.i(TAG, 'CallLogs load completed: ' + this.mAllCallRecordListDataSource.totalCount()); if (this.callLogListPages.length > page) { this.callLogListPages.splice(page, this.callLogListPages.length - page); -- Gitee