diff --git a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramUiHelper.kt b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramUiHelper.kt index 7a6894e348..7837d145b3 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramUiHelper.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/helpers/TelegramUiHelper.kt @@ -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 diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index aa22dd8010..19ac3bed8a 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -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) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt index f3a6ba6da0..88a50a7b87 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/SetTimeDialogFragment.kt @@ -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