mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
show description in open conversation list
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
06027b3c7b
commit
91726261d1
@ -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)
|
||||||
|
@ -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?
|
||||||
)
|
)
|
||||||
|
@ -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 ?: ""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
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"
|
||||||
|
@ -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" />
|
||||||
|
Loading…
Reference in New Issue
Block a user