mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 04:29:45 +01:00
Bug fixes to quoted preview
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
a4363f01ec
commit
1c2c70e64e
@ -118,7 +118,6 @@ open class ChatPresenter<T : Any>(context: Context, private val onElementClickPa
|
||||
|
||||
parentMessage.imageUrl?.let { previewMessageUrl ->
|
||||
if (previewMessageUrl == "no-preview") {
|
||||
|
||||
if (it.selectedIndividualHashMap?.containsKey("mimetype") == true) {
|
||||
holder.itemView.quotedPreviewImage.visibility = View.VISIBLE
|
||||
imageLoader.getImageLoader().loadAny(context, getDrawableResourceIdForMimeType(parentMessage.selectedIndividualHashMap!!["mimetype"])) {
|
||||
@ -131,10 +130,10 @@ open class ChatPresenter<T : Any>(context: Context, private val onElementClickPa
|
||||
holder.itemView.quotedPreviewImage.visibility = View.VISIBLE
|
||||
val mutableMap = mutableMapOf<String, String>()
|
||||
if (parentMessage.selectedIndividualHashMap?.containsKey("mimetype") == true) {
|
||||
mutableMap["mimetype"] = it.selectedIndividualHashMap!!["mimetype"]!!
|
||||
mutableMap["mimetype"] = parentMessage.selectedIndividualHashMap!!["mimetype"]!!
|
||||
}
|
||||
|
||||
imageLoader.loadImage(holder.itemView.previewImage, previewMessageUrl, mutableMap)
|
||||
imageLoader.loadImage(holder.itemView.quotedPreviewImage, previewMessageUrl, mutableMap)
|
||||
}
|
||||
} ?: run {
|
||||
holder.itemView.quotedPreviewImage.visibility = View.GONE
|
||||
@ -144,7 +143,7 @@ open class ChatPresenter<T : Any>(context: Context, private val onElementClickPa
|
||||
holder.itemView.quotedAuthor.text = parentMessage.actorDisplayName
|
||||
?: context.getText(R.string.nc_nick_guest)
|
||||
holder.itemView.quotedChatText.text = parentMessage.text
|
||||
holder.itemView.messageTime?.text = DateFormatter.format(it.createdAt, DateFormatter.Template.TIME)
|
||||
holder.itemView.quotedMessageTime?.text = DateFormatter.format(it.createdAt, DateFormatter.Template.TIME)
|
||||
} ?: run {
|
||||
holder.itemView.quotedMessageLayout.isVisible = false
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ class NetworkComponents(
|
||||
}
|
||||
|
||||
okHttpClientBuilder.dispatcher(dispatcher)
|
||||
|
||||
|
||||
return okHttpClientBuilder.build()
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,10 @@
|
||||
<View
|
||||
android:id="@+id/quoteColoredView"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/quotedAuthorLayout"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignBottom="@id/quotedChatText"
|
||||
android:layout_alignBottom="@id/quotedMessageTime"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@color/colorPrimary"
|
||||
/>
|
||||
@ -75,7 +76,6 @@
|
||||
android:textSize="10sp"
|
||||
android:textAlignment="textEnd"
|
||||
android:id="@+id/quotedMessageTime"
|
||||
android:layout_marginEnd="8dp"
|
||||
tools:text="12:30"/>
|
||||
|
||||
|
||||
|
@ -9,6 +9,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAlignment="center"
|
||||
android:padding="16dp"/>
|
||||
android:padding="8dp"/>
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user