update 优化群备注名获取

This commit is contained in:
gallonyin
2023-09-25 23:23:51 +08:00
parent 9c3610cfcd
commit eeede84600
2 changed files with 6 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ object WeworkLoopImpl {
titleList = WeworkRoomUtil.getFriendName()
} else if (Constant.fullGroupName
&& (roomType == WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP || roomType == WeworkMessageBean.ROOM_TYPE_EXTERNAL_GROUP)) {
titleList = WeworkRoomUtil.getGroupName()
titleList = WeworkRoomUtil.getFullGroupTitle()
}
}
if (roomType != WeworkMessageBean.ROOM_TYPE_UNKNOWN && titleList.size > 0) {

View File

@@ -249,13 +249,16 @@ object WeworkRoomUtil {
/**
* 获取当前群名并返回房间
* 解决title为对方正在输入中问题
* 如果有群备注则列表先插入群备注
* @return name 单聊对方姓名
*/
fun getGroupName(): ArrayList<String> {
fun getFullGroupTitle(): ArrayList<String> {
val titleList = arrayListOf<String>()
if (intoGroupManager()) {
val groupInfo = WeworkGetImpl.getGroupInfoDetail()
if (!groupInfo.groupRemark.isNullOrEmpty()) {
titleList.add(groupInfo.groupRemark)
}
titleList.add(groupInfo.groupName)
}
return titleList