Improved logs

This commit is contained in:
Sylvain Berfini 2025-02-13 11:46:43 +01:00
parent 40e9dfc522
commit 037cd71814
3 changed files with 5 additions and 4 deletions

View file

@ -149,7 +149,7 @@ class ConversationForwardMessageViewModel
val friend = model.friend
if (friend == null) {
Log.i("$TAG Friend is null, using address [${model.address}]")
Log.i("$TAG Friend is null, using address [${model.address.asStringUriOnly()}]")
onAddressSelected(model.address)
return@postOnCoreThread
}

View file

@ -240,7 +240,8 @@ class StartConversationViewModel
val chatRoom = core.createChatRoom(params, localAddress, participants)
if (chatRoom != null) {
if (chatParams.backend == ChatRoom.Backend.FlexisipChat) {
if (chatRoom.state == ChatRoom.State.Created) {
val state = chatRoom.state
if (state == ChatRoom.State.Created) {
val id = LinphoneUtils.getChatRoomId(chatRoom)
Log.i("$TAG 1-1 conversation [$id] has been created")
operationInProgress.postValue(false)
@ -253,7 +254,7 @@ class StartConversationViewModel
)
)
} else {
Log.i("$TAG Conversation isn't in Created state yet, wait for it")
Log.i("$TAG Conversation isn't in Created state yet (state is [$state]), wait for it")
chatRoom.addListener(chatRoomListener)
}
} else {

View file

@ -167,7 +167,7 @@ abstract class GenericAddressPickerFragment : GenericMainFragment() {
coreContext.postOnCoreThread { core ->
val friend = model.friend
if (friend == null) {
Log.i("$TAG Friend is null, using address [${model.address}]")
Log.i("$TAG Friend is null, using address [${model.address.asStringUriOnly()}]")
val fakeFriend = core.createFriend()
fakeFriend.addAddress(model.address)
onAddressSelected(model.address, fakeFriend)