From: luozheng <1732036298@qq.com> Date: Fri, 13 Dec 2024 08:41:19 +0000 (+0800) Subject: 1.解决#1190,日程管理批量同步的时候,手表端只显示有且最后一条bug X-Git-Tag: v1.3.113-repair_tp~143^2~5 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1517%2F1;p=mirrors%2FFD230.git 1.解决#1190,日程管理批量同步的时候,手表端只显示有且最后一条bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h b/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h index f154f4189..bd0206208 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h @@ -47,6 +47,7 @@ namespace OHOS void ItemListAdd(const ScheduleListItemInfo &item); void ItemListClear(void); void ItemListContentUpdate(void); + void ItemListScrollByUpdate(bool isUpScroll = false); void ContentScreenItemIndexSet(uint8_t index); uint8_t ContentScreenItemIndexGet(void); diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp index 9d59cfbab..761745a76 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-20 15:11:17 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-11-30 17:38:58 + * @LastEditTime: 2024-12-13 16:28:48 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/SchedulePresenter.cpp */ #include "AppViewIDs.h" @@ -100,6 +100,7 @@ namespace OHOS ScheduleModel_->ScheduleOriginalDataSetByUI(view_->ContentScreenItemIndexGet() / 2); view_->ItemListContentUpdate(); view_->DisplayDataOrNoScreen(); + view_->ItemListScrollByUpdate(); return true; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp index 1dfb891bb..b3c9bd5ff 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp @@ -797,6 +797,16 @@ namespace OHOS } } + /// @brief 列表滚动更新 + /// @param isUpScroll true 向上滚动,反之向下滚动 + void ScheduleView::ItemListScrollByUpdate(bool isUpScroll) + { + if(ScheduleList_) + { + ScheduleList_->ScrollBy(isUpScroll ? -240 : 240); + } + } + void ScheduleView::ResetScheduleList(void) { if(ScheduleListAdapter_ == nullptr || ScheduleList_== nullptr) diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c index ad5ac220b..954d8376e 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -3312,7 +3312,7 @@ bool bin_Check_schedule(uint8_t *data,uint16_t len) else Ble_Set_ScheduleInfo(id_,timetemp_begin,timetemp_end,title,str_,false); - id++; + id_++; if(title)