diff --git a/jami-android/app/src/main/java/cx/ring/adapters/ConversationAdapter.kt b/jami-android/app/src/main/java/cx/ring/adapters/ConversationAdapter.kt index 8bd992b0002c5e4a4938d14f0285c1626738dc13..6efb47efb47b809fcfbc069d0de789ec78951266 100644 --- a/jami-android/app/src/main/java/cx/ring/adapters/ConversationAdapter.kt +++ b/jami-android/app/src/main/java/cx/ring/adapters/ConversationAdapter.kt @@ -1252,7 +1252,8 @@ class ConversationAdapter( private fun configureForContactEvent(viewHolder: ConversationViewHolder, interaction: Interaction) { val event = interaction as ContactEvent Log.w(TAG, "configureForContactEvent ${event.account} ${event.event} ${event.contact} ${event.author} ") - viewHolder.mMsgDetailTxt?.text = TextUtils.timestampToDetailString(viewHolder.itemView.context, event.timestamp) + val timestamp = + TextUtils.timestampToDetailString(viewHolder.itemView.context, event.timestamp) if (interaction.isSwarm) { viewHolder.compositeDisposable.add( @@ -1266,7 +1267,7 @@ class ConversationAdapter( ContactEvent.Event.BANNED -> R.string.conversation_contact_banned else -> R.string.hist_contact_added }, vm.displayName) - viewHolder.mMsgTxt?.text = "$eventString, " + viewHolder.mMsgTxt?.text = "$eventString, $timestamp" }) } else { val eventString = when (event.event) { @@ -1277,7 +1278,7 @@ class ConversationAdapter( ContactEvent.Event.INCOMING_REQUEST -> R.string.hist_invitation_received else -> R.string.hist_contact_added } - viewHolder.mMsgTxt?.text = "$eventString, " + viewHolder.mMsgTxt?.text = "$eventString, $timestamp" } } diff --git a/jami-android/app/src/main/res/layout/item_conv_contact.xml b/jami-android/app/src/main/res/layout/item_conv_contact.xml index 0f694e35658c5ab4a2f40fd71ef56fa4e53fac74..fdde24cbb75f04301b684a68f3393fc4dc039943 100644 --- a/jami-android/app/src/main/res/layout/item_conv_contact.xml +++ b/jami-android/app/src/main/res/layout/item_conv_contact.xml @@ -27,35 +27,20 @@ along with this program; if not, write to the Free Software android:focusable="false" app:layout_anchorGravity="center_horizontal"> - <RelativeLayout - android:id="@+id/contactDetailsGroup" + <TextView + android:id="@+id/contact_event_txt" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal"> - - <TextView - android:id="@+id/contact_event_txt" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:ellipsize="middle" - android:marqueeRepeatLimit="marquee_forever" - android:maxLines="1" - android:scrollHorizontally="true" - android:singleLine="false" - android:textColor="@color/textColorSecondary" - android:textSize="12sp" - tools:text="Bob was invited, " /> - - <TextView - android:id="@+id/contact_event_details_txt" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_toEndOf="@id/contact_event_txt" - android:paddingHorizontal="4dp" - android:textColor="@color/textColorSecondary" - android:textSize="12sp" - tools:text="MAY 15, 15:28" /> - - </RelativeLayout> + android:layout_gravity="center_horizontal" + android:ellipsize="end" + android:marqueeRepeatLimit="marquee_forever" + android:maxLines="2" + android:paddingHorizontal="@dimen/padding_large" + android:scrollHorizontally="true" + android:singleLine="false" + android:textAlignment="center" + android:textColor="@color/textColorSecondary" + android:textSize="12sp" + tools:text="Bob was invited, MAY 15, 15:28" /> </FrameLayout>