diff --git a/entry/src/main/ets/model/calllog/CalllogModel.ets b/entry/src/main/ets/model/calllog/CalllogModel.ets index 0be427f6b2f0bee335e279956b938c2e07640b6c..eec5cbb253ecfe72b10320a9e215f1e6cd84d693 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 eef71a1fa613448f3a0d8a5ea58bb69adfe8ddfd..73dc3e55846f3677a29b2f34bd31f17e84e87015 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);