change icons for message sending and messages sending failed

remove shadowed var

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2025-01-10 12:07:27 +01:00
parent 68065d7e21
commit cd096366c5
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
6 changed files with 43 additions and 25 deletions

View File

@ -218,7 +218,6 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
)
binding.messageQuote.quotedChatMessageView.setOnClickListener {
val chatActivity = commonMessageInterface as ChatActivity
chatActivity.jumpToQuotedMessage(parentChatMessage)
}
} catch (e: Exception) {

View File

@ -124,12 +124,9 @@ class OutcomingTextMessageViewHolder(itemView: View) :
binding.sendingProgress.visibility = View.GONE
if (message.sendingFailed) {
updateStatus(
R.drawable.baseline_report_problem_24,
context.resources?.getString(R.string.nc_message_failed)
)
updateStatus(R.drawable.baseline_error_outline_24, context.resources?.getString(R.string.nc_message_failed))
} else if (message.isTemporary) {
showSendingSpinner()
updateStatus(R.drawable.baseline_schedule_24, context.resources?.getString(R.string.nc_message_sending))
} else if (message.readStatus == ReadStatus.READ) {
updateStatus(R.drawable.ic_check_all, context.resources?.getString(R.string.nc_message_read))
} else if (message.readStatus == ReadStatus.SENT) {
@ -170,13 +167,6 @@ class OutcomingTextMessageViewHolder(itemView: View) :
binding.checkMark.contentDescription = description
}
private fun showSendingSpinner() {
binding.sendingProgress.visibility = View.VISIBLE
binding.checkMark.visibility = View.GONE
viewThemeUtils.material.colorProgressBar(binding.sendingProgress)
}
private fun longClickOnReaction(chatMessage: ChatMessage) {
commonMessageInterface.onLongClickReactions(chatMessage)
}
@ -205,7 +195,7 @@ class OutcomingTextMessageViewHolder(itemView: View) :
).first()
}
parentChatMessage!!.activeUser = message.activeUser
parentChatMessage.activeUser = message.activeUser
parentChatMessage.imageUrl?.let {
binding.messageQuote.quotedMessageImage.visibility = View.VISIBLE
binding.messageQuote.quotedMessageImage.load(it) {
@ -232,7 +222,6 @@ class OutcomingTextMessageViewHolder(itemView: View) :
viewThemeUtils.talk.colorOutgoingQuoteBackground(binding.messageQuote.quoteColoredView)
binding.messageQuote.quotedChatMessageView.setOnClickListener {
val chatActivity = commonMessageInterface as ChatActivity
chatActivity.jumpToQuotedMessage(parentChatMessage)
}
} catch (e: Exception) {

View File

@ -0,0 +1,16 @@
<!--
~ Nextcloud Talk - Android Client
~
~ SPDX-FileCopyrightText: 2025 Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#000000"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
</vector>

View File

@ -0,0 +1,19 @@
<!--
~ Nextcloud Talk - Android Client
~
~ SPDX-FileCopyrightText: 2025 Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#000000"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
<path
android:fillColor="@android:color/white"
android:pathData="M12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z" />
</vector>

View File

@ -95,22 +95,16 @@
app:tint="@color/high_emphasis_text"
tools:src="@drawable/ic_warning_white"/>
<com.google.android.material.progressindicator.CircularProgressIndicator
<ImageView
android:id="@+id/sending_progress"
android:layout_width="wrap_content"
android:layout_height="@dimen/message_bubble_checkmark_height"
android:layout_below="@id/messageTime"
android:layout_marginStart="8dp"
android:layout_marginEnd="7dp"
android:contentDescription="@null"
android:indeterminate="true"
android:visibility="gone"
app:indicatorColor="@color/colorPrimary"
app:indicatorSize="10dp"
app:trackColor="@color/colorPrimary"
app:trackThickness="2dp"
tools:visibility="visible"
/>
app:layout_alignSelf="center"
app:tint="@color/high_emphasis_text"
tools:src="@drawable/baseline_schedule_24"/>
<include
android:id="@+id/reactions"

View File

@ -435,6 +435,7 @@ How to translate with transifex:
<string name="nc_message_sent">Message sent</string>
<string name="nc_message_offline">Offline</string>
<string name="nc_message_failed">Failed</string>
<string name="nc_message_sending">Sending</string>
<string name="nc_message_failed_to_send">Failed to send message:</string>
<string name="nc_remote_audio_off">Remote audio off</string>
<string name="nc_add_attachment">Add attachment</string>