From 285409f06fa9db756d9016a64ca45da2894d0713 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E7=BD=97=E6=AD=A3?= <1732036298@qq.com> Date: Mon, 16 Dec 2024 04:02:19 +0000 Subject: [PATCH] Merge #1517 into sdk602patch0911 from refs/changes/1517/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Code review from 罗正 * refs/changes/1517/head: (3 commits squashed) - thread main 函数开始将gpio34设置为不使能,鸿蒙os启动后使能gpio34 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 1.解决#1190,日程管理批量同步的时候,手表端只显示有且最后一条bug Signed-off-by: 罗正 <1732036298@qq.com> Reviewed-by: Caisking <3449750381@qq.com> Reviewed-by: 罗正 <1732036298@qq.com> Reviewed-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Reviewed-by: aliyun6865282430 <1624952103@qq.com> Merged-by: Caisking <3449750381@qq.com> CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1517 --- .../fd230app/nativeui/schedule/include/ScheduleView.h | 1 + .../nativeui/schedule/src/SchedulePresenter.cpp | 3 ++- .../fd230app/nativeui/schedule/src/ScheduleView.cpp | 10 ++++++++++ .../wearable/service/ble_service/bleservice/bleEvent.c | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) 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) -- 2.17.1