Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
  • Loading branch information
rapterjet2004 committed Nov 11, 2024
1 parent d786093 commit 26dfddc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 4 additions & 5 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ class ChatActivity :
}

processExpiredMessages()
processCallStartedMessages(chatMessageList)
processCallStartedMessages()

adapter?.notifyDataSetChanged()
}
Expand Down Expand Up @@ -2547,7 +2547,7 @@ class ChatActivity :
webSocketInstance?.getSignalingMessageReceiver()?.addListener(conversationMessageListener)
}

private fun processCallStartedMessages(chatMessageList: List<ChatMessage>) {
private fun processCallStartedMessages() {
try {
val mostRecentCallSystemMessage = adapter?.items?.first {
it.item is ChatMessage &&
Expand All @@ -2565,8 +2565,7 @@ class ChatActivity :

if (mostRecentCallSystemMessage != null) {
processMostRecentMessage(
mostRecentCallSystemMessage as ChatMessage,
chatMessageList
mostRecentCallSystemMessage as ChatMessage
)
}
} catch (e: NoSuchElementException) {
Expand Down Expand Up @@ -3530,7 +3529,7 @@ class ChatActivity :
else -> false
}

private fun processMostRecentMessage(recent: ChatMessage, chatMessageList: List<ChatMessage>) {
private fun processMostRecentMessage(recent: ChatMessage) {
when (recent.systemMessageType) {
ChatMessage.SystemMessageType.CALL_STARTED -> {
if (!callStarted) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -231,7 +230,7 @@ class MessageInputFragment : Fragment() {
}

override fun onError(error: Drawable?) {
Log.d("Julius", "Error")
// unused atm
}

override fun onSuccess(result: Drawable) {
Expand Down Expand Up @@ -466,7 +465,6 @@ class MessageInputFragment : Fragment() {

setDropDown(isCollapsed)
}

}

private fun setDropDown(collapsed: Boolean) {
Expand Down

0 comments on commit 26dfddc

Please sign in to comment.