Commit f57d02bd by 严久程

进入私聊页面逻辑

parent d7080778
...@@ -10,7 +10,7 @@ ext { ...@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.29.9", "m-fm" : "0.0.29.9",
"m-user" : "0.0.60.10", "m-user" : "0.0.60.10",
"m-home" : "0.0.22.3", "m-home" : "0.0.22.3",
"m-im" : "0.0.18.7", "m-im" : "0.0.18.8",
"m-dynamic" : "0.0.7.7", "m-dynamic" : "0.0.7.7",
"m-article" : "0.0.0.5", "m-article" : "0.0.0.5",
...@@ -28,7 +28,7 @@ ext { ...@@ -28,7 +28,7 @@ ext {
"m-tests-api" : "0.0.2", "m-tests-api" : "0.0.2",
"m-user-api" : "0.0.10.15", "m-user-api" : "0.0.10.15",
"m-home-api" : "0.0.4.1", "m-home-api" : "0.0.4.1",
"m-im-api" : "0.0.12.20", "m-im-api" : "0.0.12.21",
"m-dynamic-api" : "0.0.3.7", "m-dynamic-api" : "0.0.3.7",
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
...@@ -36,7 +36,7 @@ ext { ...@@ -36,7 +36,7 @@ ext {
"ydl-platform" : "0.0.39.26", "ydl-platform" : "0.0.39.26",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.31", "ydl-webview" : "0.0.38.32",
"ydl-media" : "0.0.21.6", "ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9", "ydl-pay" : "0.0.18.9",
"m-audioim" : "0.0.49.28", "m-audioim" : "0.0.49.28",
......
...@@ -156,6 +156,25 @@ object IMChatUtil { ...@@ -156,6 +156,25 @@ object IMChatUtil {
) )
} }
fun startChatCloseReplaceChat(context: AppCompatActivity, toUid: String){
if (!isLogin(context, true)) {
return
}
if (loadingDialog == null) {
loadingDialog = newInstance(null)
}
if (context.supportFragmentManager != null && !context.isDestroyed) {
loadingDialog?.show(context.supportFragmentManager, null)
}
prepareChatData(context, toUid, object :
ChatDataRequestListener {
override fun onSuccess(expertInfo: IMExpertBuild) {
startChatSession(toUid, expertInfo, 0, context)
}
})
}
/** /**
* 开启聊天会话 * 开启聊天会话
*/ */
......
...@@ -210,6 +210,10 @@ class IMServiceImpl : IImService { ...@@ -210,6 +210,10 @@ class IMServiceImpl : IImService {
IMChatUtil.startChat(context as AppCompatActivity, toUid,isFramQingsu) IMChatUtil.startChat(context as AppCompatActivity, toUid,isFramQingsu)
} }
override fun startChatCloseReplaceChat(context: Activity, toUid: String) {
IMChatUtil.startChatCloseReplaceChat(context as AppCompatActivity,toUid)
}
override fun getUnReadByUid(uid: String): Int { override fun getUnReadByUid(uid: String): Int {
return MsgReceiveHelper.getUnNum(uid) return MsgReceiveHelper.getUnNum(uid)
} }
......
...@@ -60,6 +60,9 @@ interface IImService : IProvider { ...@@ -60,6 +60,9 @@ interface IImService : IProvider {
fun startChat(context : Activity ,toUid : String ,flag : Int , canTalk : Int, isFramQingsu: Int, isFromMessageList: Boolean) fun startChat(context : Activity ,toUid : String ,flag : Int , canTalk : Int, isFramQingsu: Int, isFromMessageList: Boolean)
fun startChatCloseReplaceChat(context : Activity ,toUid : String)
/** /**
* 根据对方uid获取未读数 * 根据对方uid获取未读数
*/ */
......
...@@ -133,6 +133,8 @@ class H5JsBean { ...@@ -133,6 +133,8 @@ class H5JsBean {
var callType:String?=null var callType:String?=null
var switchStatus = 1 var switchStatus = 1
var closeReplaceChat=false
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment