Fix group gray icon and bot description
This commit is contained in:
parent
2d78996344
commit
37658d86a6
1 changed files with 14 additions and 3 deletions
|
@ -419,8 +419,13 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
|
||||||
val openOnMapView = holder.getOpenOnMapClickView()
|
val openOnMapView = holder.getOpenOnMapClickView()
|
||||||
|
|
||||||
val staleLocation = System.currentTimeMillis() / 1000 - item.lastUpdated > settings.staleLocTime
|
val staleLocation = System.currentTimeMillis() / 1000 - item.lastUpdated > settings.staleLocTime
|
||||||
if (staleLocation && item.userId != 0) {
|
if (staleLocation) {
|
||||||
TelegramUiHelper.setupPhoto(app, holder.icon, item.grayscalePhotoPath, item.placeholderId, false)
|
val photoPath = if (settings.liveNowSortType.isSortByGroup() && item is ChatItem && !item.privateChat) {
|
||||||
|
item.photoPath
|
||||||
|
} else {
|
||||||
|
item.grayscalePhotoPath
|
||||||
|
}
|
||||||
|
TelegramUiHelper.setupPhoto(app, holder.icon, photoPath, item.placeholderId, false)
|
||||||
} else {
|
} else {
|
||||||
TelegramUiHelper.setupPhoto(app, holder.icon, item.photoPath, R.drawable.img_user_picture_active, false)
|
TelegramUiHelper.setupPhoto(app, holder.icon, item.photoPath, R.drawable.img_user_picture_active, false)
|
||||||
}
|
}
|
||||||
|
@ -482,7 +487,13 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
|
||||||
|
|
||||||
private fun getChatItemDescription(item: ChatItem): String {
|
private fun getChatItemDescription(item: ChatItem): String {
|
||||||
return when {
|
return when {
|
||||||
item.chatWithBot -> getString(R.string.shared_string_bot)
|
item.chatWithBot -> {
|
||||||
|
if (settings.liveNowSortType.isSortByGroup()) {
|
||||||
|
getString(R.string.shared_string_bot)
|
||||||
|
} else {
|
||||||
|
OsmandFormatter.getListItemLiveTimeDescr(app, item.lastUpdated, lastResponseStr)
|
||||||
|
}
|
||||||
|
}
|
||||||
item.privateChat -> OsmandFormatter.getListItemLiveTimeDescr(app, item.lastUpdated, lastResponseStr)
|
item.privateChat -> OsmandFormatter.getListItemLiveTimeDescr(app, item.lastUpdated, lastResponseStr)
|
||||||
else -> {
|
else -> {
|
||||||
if (settings.liveNowSortType.isSortByGroup()) {
|
if (settings.liveNowSortType.isSortByGroup()) {
|
||||||
|
|
Loading…
Reference in a new issue