Sfoglia il codice sorgente

feat(im): 优化 IM 登录和消息发送逻辑

- 添加 IM 在线状态枚举和相关监听接口
- 实现 IM 登录状态的管理和持久化
-优化消息发送流程,添加发送状态监听
- 调整 UI 以显示 IM 连接状态和消息发送状态
- 修正部分注释和命名,提高代码可读性
xuqm 3 settimane fa
parent
commit
2d357c90db
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      src/main/ets/view/refresh/RefreshView.ets

+ 7 - 2
src/main/ets/view/refresh/RefreshView.ets

@@ -113,7 +113,8 @@ export struct RefreshView {
 
   // 使用父组件@Builder装饰的方法初始化子组件@BuilderParam
   @BuilderParam customBuilderParam: (item: ESObject, index: number) => void
-  @BuilderParam headBuilderParam: () => void = this.doNothingBuilder;
+  @BuilderParam headerBuilderParam: () => void = this.doNothingBuilder;
+  @BuilderParam footerBuilderParam: () => void = this.doNothingBuilder;
 
   build() {
 
@@ -123,7 +124,7 @@ export struct RefreshView {
           scroller: this._scroller,
         }) {
           ListItem() {
-            this.headBuilderParam()
+            this.headerBuilderParam()
           }
 
           ForEach(this.data ?? [], (item: ESObject, index: number) => {
@@ -131,6 +132,10 @@ export struct RefreshView {
               this.customBuilderParam(item, index)
             }
           }, (item: ESObject, index: number) => this.keyGenerator!(item, index))
+
+          ListItem() {
+            this.footerBuilderParam()
+          }
         }
         .onTouch((event: TouchEvent) => {
           const e1 = event.touches[0]