|
@@ -47,6 +47,10 @@ class ChatDetailActivity : BaseXActivity<ActivityChatDetailBinding>() {
|
|
@JvmField
|
|
@JvmField
|
|
var chatName: String = ""
|
|
var chatName: String = ""
|
|
|
|
|
|
|
|
+ @Autowired(required = true)
|
|
|
|
+ @JvmField
|
|
|
|
+ var headSpecial: String = ""
|
|
|
|
+
|
|
private var svgaParser:SVGAParser? = null
|
|
private var svgaParser:SVGAParser? = null
|
|
|
|
|
|
private var messageRecyclerView:MessageLayout?=null
|
|
private var messageRecyclerView:MessageLayout?=null
|
|
@@ -67,9 +71,6 @@ class ChatDetailActivity : BaseXActivity<ActivityChatDetailBinding>() {
|
|
ARouter.getInstance().inject(this)
|
|
ARouter.getInstance().inject(this)
|
|
|
|
|
|
svgaParser = SVGAParser(this)
|
|
svgaParser = SVGAParser(this)
|
|
- if (!TextUtils.isEmpty(account)){
|
|
|
|
- userVm.getOtherUserInfo(account,"")
|
|
|
|
- }
|
|
|
|
val chatInfo = ChatInfo()
|
|
val chatInfo = ChatInfo()
|
|
chatInfo.type = V2TIMConversation.V2TIM_C2C
|
|
chatInfo.type = V2TIMConversation.V2TIM_C2C
|
|
chatInfo.chatName = chatName
|
|
chatInfo.chatName = chatName
|
|
@@ -132,20 +133,17 @@ class ChatDetailActivity : BaseXActivity<ActivityChatDetailBinding>() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (!TextUtils.isEmpty(headSpecial)){
|
|
|
|
+ svgaParser?.decodeFromURL(URL(headSpecial), object :SVGAParser.ParseCompletion{
|
|
|
|
+ override fun onComplete(videoItem: SVGAVideoEntity) {
|
|
|
|
+ messageRecyclerView?.leftSvgaAvatar = videoItem
|
|
|
|
+ }
|
|
|
|
|
|
- userVm.otherUserInfoLiveData.observe(this){
|
|
|
|
- if (!TextUtils.isEmpty(it.android_head_special)){
|
|
|
|
- svgaParser?.decodeFromURL(URL(it.android_head_special), object :SVGAParser.ParseCompletion{
|
|
|
|
- override fun onComplete(videoItem: SVGAVideoEntity) {
|
|
|
|
- messageRecyclerView?.leftSvgaAvatar = videoItem
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- override fun onError() {
|
|
|
|
|
|
+ override fun onError() {
|
|
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if (UserInfo.getUserInfo() != null && !TextUtils.isEmpty(UserInfo.getUserInfo()?.android_head_special)){
|
|
if (UserInfo.getUserInfo() != null && !TextUtils.isEmpty(UserInfo.getUserInfo()?.android_head_special)){
|