Skip to content

Commit

Permalink
Merge pull request #6 from MJLblabla/main
Browse files Browse the repository at this point in the history
升级1.0.1去除sdk里面带有主题的问题
  • Loading branch information
MJLblabla authored Jan 20, 2022
2 parents 250bb59 + c4918f2 commit f286277
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {

api 'com.github.tbruyelle:rxpermissions:0.10.2'
// implementation project(":qndroidimsdk")
implementation (name:'qndroid-imsdk-1.0.0',ext:"aar")
implementation (name:'qndroid-imsdk-1.0.1',ext:"aar")

implementation project(':lib:lib_network')
implementation project(':lib:bzuicomp_bottomInput')
Expand Down
Binary file not shown.
40 changes: 40 additions & 0 deletions app/src/main/java/com/qiniu/qndroidimsdk/room/ChatRoomFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ import com.qiniu.droid.imsdk.QNIMClient
import com.qiniu.qndroidimsdk.R
import com.qiniu.qndroidimsdk.UserInfoManager
import com.qiniu.qndroidimsdk.pubchat.InputMsgReceiver
import im.floo.BMXDataCallBack
import im.floo.floolib.BMXConversation
import im.floo.floolib.BMXConversationList
import im.floo.floolib.BMXErrorCode
import im.floo.floolib.BMXMessageList
import kotlinx.android.synthetic.main.chat_fragment.*
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -55,6 +59,42 @@ class ChatRoomFragment : Fragment() {
}
}
.show(childFragmentManager, "RoomInputDialog")


// QNIMClient.getChatManager().getAllConversations(object :
// BMXDataCallBack<BMXConversationList> {
// override fun onResult(p0: BMXErrorCode?, p1: BMXConversationList) {
// for (i in 0..p1.size()){
//
// }
// }
// })

QNIMClient.getChatManager().openConversation(UserInfoManager.mIMGroup!!.im_group_id,
BMXConversation.Type.Group,
false,
object : BMXDataCallBack<BMXConversation> {
override fun onResult(p0: BMXErrorCode?, p1: BMXConversation?) {
QNIMClient.getChatManager().retrieveHistoryMessages(p1, 0, 100,
object : BMXDataCallBack<BMXMessageList> {
override fun onResult(p0: BMXErrorCode?, msgs: BMXMessageList?) {
val size =msgs?.size()?:return;
Log.d("mjl","retrieveHistoryMessages"+size)
if(size<=0){
return
}
for (i in 0 until size.toInt()) {
val msg = msgs[i]
msg.fromId() //来自谁
msg.attachment()
msg.content()
}
}
})
}

}
)
}

Log.d(
Expand Down

0 comments on commit f286277

Please sign in to comment.