diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index eafa34fe2d..247cb50ece 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -878,7 +878,7 @@ class ChatActivity : } processExpiredMessages() - processCallStartedMessages(chatMessageList) + processCallStartedMessages() adapter?.notifyDataSetChanged() } @@ -2547,7 +2547,7 @@ class ChatActivity : webSocketInstance?.getSignalingMessageReceiver()?.addListener(conversationMessageListener) } - private fun processCallStartedMessages(chatMessageList: List) { + private fun processCallStartedMessages() { try { val mostRecentCallSystemMessage = adapter?.items?.first { it.item is ChatMessage && @@ -2565,8 +2565,7 @@ class ChatActivity : if (mostRecentCallSystemMessage != null) { processMostRecentMessage( - mostRecentCallSystemMessage as ChatMessage, - chatMessageList + mostRecentCallSystemMessage as ChatMessage ) } } catch (e: NoSuchElementException) { @@ -3530,7 +3529,7 @@ class ChatActivity : else -> false } - private fun processMostRecentMessage(recent: ChatMessage, chatMessageList: List) { + private fun processMostRecentMessage(recent: ChatMessage) { when (recent.systemMessageType) { ChatMessage.SystemMessageType.CALL_STARTED -> { if (!callStarted) { diff --git a/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt b/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt index a3db464850..1047849efc 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/MessageInputFragment.kt @@ -217,10 +217,9 @@ class MessageInputFragment : Fragment() { true ) } else { - ApiUtils.getUrlForAvatar(user!!.baseUrl!!, message.actorDisplayName, false) + ApiUtils.getUrlForAvatar(user!!.baseUrl!!, message.actorId, false) } - Log.d("Julius", "URL is $url") val imageRequest: ImageRequest = ImageRequest.Builder(requireContext()) .data(url) .crossfade(true) @@ -231,7 +230,7 @@ class MessageInputFragment : Fragment() { } override fun onError(error: Drawable?) { - Log.d("Julius", "Error") + // unused atm } override fun onSuccess(result: Drawable) { @@ -466,7 +465,6 @@ class MessageInputFragment : Fragment() { setDropDown(isCollapsed) } - } private fun setDropDown(collapsed: Boolean) {