Skip to content
Snippets Groups Projects
Commit 464f9a18 authored by Emma Falkiewitz's avatar Emma Falkiewitz
Browse files

chatView: line return for long username in contact event

Fix for I055e132382fb8cd2b06b499689b04952da62fafe

Change-Id: Id600ee7613527026bf2f8c4ec101beff884d508d
parent 5f45cd12
Branches
Tags android/release_389
No related merge requests found
......@@ -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"
}
}
......
......@@ -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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment