show description in open conversation list

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2024-05-07 20:51:15 +02:00 committed by Marcel Hibbe
parent 06027b3c7b
commit 91726261d1
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
5 changed files with 26 additions and 9 deletions

View File

@ -36,6 +36,7 @@ class OpenConversationsAdapter(val user: User, private val onClick: (OpenConvers
fun bindItem(conversation: OpenConversation) { fun bindItem(conversation: OpenConversation) {
currentConversation = conversation currentConversation = conversation
itemBinding.nameText.text = conversation.displayName itemBinding.nameText.text = conversation.displayName
itemBinding.descriptionText.text = conversation.description
// load avatar from server when https://github.com/nextcloud/spreed/issues/9600 is solved // load avatar from server when https://github.com/nextcloud/spreed/issues/9600 is solved
// itemBinding.avatarView.loadUserAvatar(user, conversation.displayName, true, false) // itemBinding.avatarView.loadUserAvatar(user, conversation.displayName, true, false)

View File

@ -9,5 +9,6 @@ package com.nextcloud.talk.openconversations.data
data class OpenConversation( data class OpenConversation(
var roomId: String, var roomId: String,
var roomToken: String, var roomToken: String,
var displayName: String var displayName: String,
var description: String?
) )

View File

@ -34,7 +34,8 @@ class OpenConversationsRepositoryImpl(private val ncApi: NcApi, currentUserProvi
OpenConversation( OpenConversation(
conversation.roomId!!, conversation.roomId!!,
conversation.token!!, conversation.token!!,
conversation.name!! conversation.name!!,
conversation.description ?: ""
) )
} }
) )

View File

@ -33,7 +33,7 @@
android:id="@+id/open_conversations_recycler_view" android:id="@+id/open_conversations_recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layoutManager="LinearLayoutManager"/> app:layoutManager="LinearLayoutManager" />
<LinearLayout <LinearLayout
android:id="@+id/progress_bar_wrapper" android:id="@+id/progress_bar_wrapper"

View File

@ -21,18 +21,32 @@
android:id="@+id/name_text" android:id="@+id/name_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/avatar_view" android:layout_toEndOf="@id/avatar_view"
android:layout_marginTop="4dp"
android:ellipsize="end" android:ellipsize="end"
android:lines="1" android:lines="1"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAppearance="@style/ListItem" android:textAppearance="@style/ListItem"
tools:text="Jane Doe" /> tools:text="Jane Doe" />
<androidx.emoji2.widget.EmojiTextView
android:id="@+id/description_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/avatar_view"
android:layout_below= "@id/name_text"
android:paddingTop="4dp"
android:ellipsize="end"
android:lines="1"
android:textAlignment="viewStart"
android:textColor="@color/low_emphasis_text"
android:textSize="14sp"
tools:text="Jane Doe" />
<ImageView <ImageView
android:id="@+id/avatar_view" android:id="@+id/avatar_view"
android:layout_width="@dimen/avatar_size" android:layout_width="60dp"
android:layout_height="@dimen/avatar_size" android:layout_height="60dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/standard_margin" android:layout_marginEnd="@dimen/standard_margin"
android:contentDescription="@string/avatar" /> android:contentDescription="@string/avatar" />