mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Do not use by lazy in Datas, will be probably called by UI thread instead of Core thread
This commit is contained in:
parent
78d55d6c78
commit
bd42eebdcb
1 changed files with 3 additions and 4 deletions
|
|
@ -32,9 +32,12 @@ import org.linphone.utils.TimestampUtils
|
|||
|
||||
class ChatRoomData(val chatRoom: ChatRoom) {
|
||||
val id = LinphoneUtils.getChatRoomId(chatRoom)
|
||||
|
||||
val localSipUri = chatRoom.localAddress.asString()
|
||||
val remoteSipUri = chatRoom.peerAddress.asString()
|
||||
|
||||
val isOneToOne = chatRoom.hasCapability(ChatRoom.Capabilities.OneToOne.toInt())
|
||||
|
||||
val contactName = MutableLiveData<String>()
|
||||
|
||||
val subject = MutableLiveData<String>()
|
||||
|
|
@ -63,10 +66,6 @@ class ChatRoomData(val chatRoom: ChatRoom) {
|
|||
|
||||
var chatRoomDataListener: ChatRoomDataListener? = null
|
||||
|
||||
val isOneToOne: Boolean by lazy {
|
||||
chatRoom.hasCapability(ChatRoom.Capabilities.OneToOne.toInt())
|
||||
}
|
||||
|
||||
private val coreListener = object : CoreListenerStub() {
|
||||
override fun onChatRoomRead(core: Core, chatRoom: ChatRoom) {
|
||||
if (chatRoom == this@ChatRoomData.chatRoom) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue