wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  ref |> 更新融云IM SDK 1.0.2 解决创建房间问题
  ref |> 完善直播IM置顶,取消置顶、上墙消息
... ... @@ -37,7 +37,7 @@ export class LiveRoom extends ChatroomStatusListener {
let msgCount = 0;
Logger.debug(TAG, `will enterRoom roomId: ${roomId}`);
IMEngine.getInstance().joinExistingChatroom(roomId, msgCount).then(result => {
IMEngine.getInstance().joinChatroom(roomId, msgCount).then(result => {
if (EngineError.Success !== result.code) {
// 加入聊天室失败
Logger.error(TAG, 'onChatroomJoinFailed roomId: ' + roomId + " code: " + result.code);
... ...
... ... @@ -10,7 +10,7 @@ import { LiveViewModel } from '../../viewModel/LiveViewModel'
import { Logger } from 'wdKit'
import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout'
import { PeopleShipNoMoreData } from 'wdComponent/src/main/ets/components/reusable/PeopleShipNoMoreData'
import { LiveMessageOptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'
import { LiveMessageIsHistoryMessage, LiveMessageOptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean'
import { ArrayList } from '@kit.ArkTS'
const TAG: string = 'TabLiveComponent';
... ... @@ -40,36 +40,34 @@ export struct TabLiveComponent {
case LiveMessageOptType.ZH_UPDATE_MSG: {
const index = this.liveViewModel.getLiveRoomItemBeanIndex(this.lastInputedComment, this.liveList)
this.liveList.updateItem(this.lastInputedComment, index)
return
}
break
} break
case LiveMessageOptType.ZH_DELETE_MSG: {
const index = this.liveViewModel.getLiveRoomItemBeanIndex(this.lastInputedComment, this.liveList)
this.liveList.deleteItem(index);
return
}
break
} break
case LiveMessageOptType.ZH_TOP_MSG:
case LiveMessageOptType.ZH_UN_TOP_MSG:
case LiveMessageOptType.ZH_WALL_MSG:
case LiveMessageOptType.ZH_WALL_MSG: {
this.sortLiveRoomItemBean()
} break
default: {
let datas: LazyDataSource<LiveRoomItemBean> =
this.liveViewModel.sortLiveRoomItemBean(this.lastInputedComment, this.liveList)
this.liveList.replaceAll()
this.liveList.addItems(datas.getDataArray())
return
let optType = this.lastInputedComment.optionType != undefined ? this.lastInputedComment.optionType : this.lastInputedComment.dataType
if (LiveMessageIsHistoryMessage(optType)) {
this.sortLiveRoomItemBean()
}
break
} break
}
if (this.liveList.totalCount() === 0) {
this.liveList.push(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
} else {
this.liveList.addFirstItem(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
}
// if (this.liveList.totalCount() === 0) {
// this.liveList.push(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
// } else {
// this.liveList.addFirstItem(this.liveViewModel.deepCopyLiveRoomItem(this.lastInputedComment))
// }
this.pageModel.viewType = ViewType.LOADED;
}
build() {
Stack() {
if (this.pageModel.viewType == ViewType.LOADING) {
... ... @@ -215,7 +213,11 @@ export struct TabLiveComponent {
})
}
sortLiveRoomItemBean() {
let datas: LazyDataSource<LiveRoomItemBean> = this.liveViewModel.sortLiveRoomItemBean(this.lastInputedComment, this.liveList)
this.liveList.replaceAll()
this.liveList.addItems(datas.getDataArray())
}
updateLiveListData() {
let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean
liveRoomItemBeanTemp.text = this.contentDetailData.newIntroduction
... ...