mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
add avatar for autocomplete mentions in recycler view
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
f02257d5ff
commit
0de8a3e06e
@ -19,6 +19,7 @@ import com.nextcloud.talk.data.user.model.User
|
||||
import com.nextcloud.talk.extensions.loadDefaultAvatar
|
||||
import com.nextcloud.talk.extensions.loadFederatedUserAvatar
|
||||
import com.nextcloud.talk.extensions.loadGuestAvatar
|
||||
import com.nextcloud.talk.extensions.loadTeamAvatar
|
||||
import com.nextcloud.talk.extensions.loadUserAvatar
|
||||
import com.nextcloud.talk.models.json.mention.Mention
|
||||
import com.nextcloud.talk.models.json.status.StatusType
|
||||
@ -166,9 +167,7 @@ class MentionAutocompleteItem(
|
||||
}
|
||||
|
||||
SOURCE_TEAMS ->{
|
||||
holder.binding.avatarView.loadUserAvatar(
|
||||
viewThemeUtils.talk.themePlaceholderAvatar(holder.binding.avatarView, R.drawable.ic_avatar_group)
|
||||
)
|
||||
holder.binding.avatarView.loadTeamAvatar(viewThemeUtils)
|
||||
}
|
||||
|
||||
else -> {
|
||||
|
@ -343,6 +343,11 @@ fun ImageView.loadDefaultGroupCallAvatar(viewThemeUtils: ViewThemeUtils): io.rea
|
||||
return loadUserAvatar(data)
|
||||
}
|
||||
|
||||
fun ImageView.loadTeamAvatar(viewThemeUtils: ViewThemeUtils): io.reactivex.disposables.Disposable {
|
||||
val data: Any = viewThemeUtils.talk.themePlaceholderAvatar(this, R.drawable.icon_team_white) as Any
|
||||
return loadUserAvatar(data)
|
||||
}
|
||||
|
||||
fun ImageView.loadDefaultAvatar(viewThemeUtils: ViewThemeUtils): io.reactivex.disposables.Disposable {
|
||||
val data: Any = viewThemeUtils.talk.themePlaceholderAvatar(this, R.drawable.account_circle_96dp) as Any
|
||||
return loadUserAvatar(data)
|
||||
|
9
app/src/main/res/drawable/icon_team_white.xml
Normal file
9
app/src/main/res/drawable/icon_team_white.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,5.5A3.5,3.5 0,0 1,15.5 9A3.5,3.5 0,0 1,12 12.5A3.5,3.5 0,0 1,8.5 9A3.5,3.5 0,0 1,12 5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0,0 1,2 11A3,3 0,0 1,5 8M19,8A3,3 0,0 1,22 11A3,3 0,0 1,19 14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z"
|
||||
android:fillColor="#fff"/>
|
||||
</vector>
|
Loading…
Reference in New Issue
Block a user