adjust layout

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-02-21 13:56:09 +01:00 committed by Marcel Hibbe
parent b323915d0f
commit 47551284f6
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 8 additions and 14 deletions

View File

@ -188,7 +188,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
} }
private fun updateCheckboxStates(chatMessage: ChatMessage, user: User, checkboxes: List<CheckBox>) { private fun updateCheckboxStates(chatMessage: ChatMessage, user: User, checkboxes: List<CheckBox>) {
job = CoroutineScope(Dispatchers.Main).launch { job = CoroutineScope(Dispatchers.Main).launch {
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
val apiVersion: Int = ApiUtils.getChatApiVersion( val apiVersion: Int = ApiUtils.getChatApiVersion(
user.capabilities?.spreedCapability!!, user.capabilities?.spreedCapability!!,
@ -205,10 +205,12 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
if (result.isSuccess) { if (result.isSuccess) {
val editedMessage = result.getOrNull()?.ocs?.data!!.parentMessage!! val editedMessage = result.getOrNull()?.ocs?.data!!.parentMessage!!
Log.d(TAG," EditedMessage: $editedMessage") Log.d(TAG, "EditedMessage: $editedMessage")
binding.messageEditIndicator.apply { binding.messageEditIndicator.apply {
visibility = View.VISIBLE visibility = View.VISIBLE
} }
binding.messageTime.text =
dateUtils.getLocalTimeStringFromTimestamp(editedMessage.lastEditTimestamp!!)
} else { } else {
Snackbar.make(binding.root, R.string.nc_common_error_sorry, Snackbar.LENGTH_LONG).show() Snackbar.make(binding.root, R.string.nc_common_error_sorry, Snackbar.LENGTH_LONG).show()
} }

View File

@ -74,25 +74,17 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="8dp"
android:gravity="end"
android:orientation="horizontal"
android:layout_below="@id/messageText"
app:layout_alignSelf="flex_end">
<TextView <TextView
android:id="@id/messageTime" android:id="@id/messageTime"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/messageText"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:alpha="0.6" android:alpha="0.6"
android:textColor="@color/no_emphasis_text" android:textColor="@color/no_emphasis_text"
android:textIsSelectable="false" android:textIsSelectable="false"
android:gravity = "end" android:gravity="end"
app:layout_alignSelf="center"
app:layout_flexGrow="1" app:layout_flexGrow="1"
app:layout_alignSelf="flex_end" app:layout_alignSelf="flex_end"
app:layout_wrapBefore="false" app:layout_wrapBefore="false"
@ -103,6 +95,7 @@
android:id="@+id/messageEditIndicator" android:id="@+id/messageEditIndicator"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/messageText"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:alpha="0.6" android:alpha="0.6"
android:textColor="@color/no_emphasis_text" android:textColor="@color/no_emphasis_text"
@ -111,7 +104,6 @@
android:text = "@string/hint_edited_message" android:text = "@string/hint_edited_message"
android:textSize="12sp"> android:textSize="12sp">
</TextView> </TextView>
</LinearLayout>
<include <include
android:id="@+id/reactions" android:id="@+id/reactions"