From: luozheng <1732036298@qq.com> Date: Mon, 14 Oct 2024 01:59:54 +0000 (+0800) Subject: #526,解决,录音·有概率录音后列表不显示录音记录bug X-Git-Tag: release_V1.2.70_20241020_135402~62 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=8b033bdb3a271d8dd2248ae4a5c5ee5ea893f7b2;p=mirrors%2FFD230.git #526,解决,录音·有概率录音后列表不显示录音记录bug #843,解决,录音文件排序错乱bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp index ff254eb5c..a1bf8d5a0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp @@ -582,7 +582,9 @@ namespace OHOS { for (int j = 0; j < mp3FileCount - i - 1; j++) { - if (strcmp(info[j].recordingFileName, info[j + 1].recordingFileName) < 0) + int a = atoi(info[j].recordingFileName); + int b = atoi(info[j + 1].recordingFileName); + if (a < b) { RecordingInfo temp = info[j]; info[j] = info[j + 1]; diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp index 09016c40c..34393ae3e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-30 09:14:38 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-13 19:51:27 + * @LastEditTime: 2024-10-14 09:43:08 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp */ @@ -230,6 +230,7 @@ namespace OHOS // strncpy_s(info.recordingDuration, 16, TotalRecordDuration.c_str(), TotalRecordDuration.length()); // strncpy_s(info.recordingTime, 16, yyymmhhh_date.c_str(), yyymmhhh_date.length()); p_RecordingModel->RecordDataWriteToFile(recordingFileName.c_str()); + RecordingModel::GetInstance()->InitRecordingListItem(); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingView StopRecord over!!"); }