remove default values from setupPhoto
This commit is contained in:
parent
85a01ba2c7
commit
baa952fde3
3 changed files with 5 additions and 5 deletions
|
@ -15,8 +15,8 @@ object TelegramUiHelper {
|
|||
app: TelegramApplication,
|
||||
iv: ImageView?,
|
||||
photoPath: String?,
|
||||
placeholderId: Int = R.drawable.img_user_picture,
|
||||
useThemedIcon: Boolean = true
|
||||
placeholderId: Int,
|
||||
useThemedIcon: Boolean
|
||||
) {
|
||||
if (iv == null) {
|
||||
return
|
||||
|
@ -49,6 +49,7 @@ object TelegramUiHelper {
|
|||
chatId = chat.id
|
||||
chatTitle = chat.title
|
||||
photoPath = chat.photo?.small?.local?.path
|
||||
placeholderId = R.drawable.img_user_picture
|
||||
}
|
||||
val type = chat.type
|
||||
if (type is TdApi.ChatTypePrivate || type is TdApi.ChatTypeSecret) {
|
||||
|
@ -63,7 +64,6 @@ object TelegramUiHelper {
|
|||
res.latLon = LatLon(content.location.latitude, content.location.longitude)
|
||||
}
|
||||
}
|
||||
res.placeholderId = R.drawable.img_user_picture
|
||||
} else if (type is TdApi.ChatTypeBasicGroup) {
|
||||
res.placeholderId = R.drawable.img_group_picture
|
||||
res.membersCount = helper.getBasicGroupFullInfo(type.basicGroupId)?.members?.size ?: 0
|
||||
|
|
|
@ -355,7 +355,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
|
|||
override fun onBindViewHolder(holder: ChatViewHolder, position: Int) {
|
||||
val chat = chats[position]
|
||||
val lastItem = position == itemCount - 1
|
||||
val placeholderId: Int = if (telegramHelper.isGroup(chat)) R.drawable.img_group_picture else R.drawable.img_user_picture
|
||||
val placeholderId = if (telegramHelper.isGroup(chat)) R.drawable.img_group_picture else R.drawable.img_user_picture
|
||||
val live = app.settings.isSharingLocationToChat(chat.id)
|
||||
|
||||
TelegramUiHelper.setupPhoto(app, holder.icon, chat.photo?.small?.local?.path, placeholderId, false)
|
||||
|
|
|
@ -212,7 +212,7 @@ class SetTimeDialogFragment : DialogFragment() {
|
|||
|
||||
override fun onBindViewHolder(holder: ChatViewHolder, position: Int) {
|
||||
val chat = chats[position]
|
||||
val placeholderId: Int = if (telegramHelper.isGroup(chat)) R.drawable.img_group_picture else R.drawable.img_user_picture
|
||||
val placeholderId = if (telegramHelper.isGroup(chat)) R.drawable.img_group_picture else R.drawable.img_user_picture
|
||||
|
||||
TelegramUiHelper.setupPhoto(app, holder.icon, chat.photo?.small?.local?.path, placeholderId, false)
|
||||
holder.title?.text = chat.title
|
||||
|
|
Loading…
Reference in a new issue