added checks for locationViewContainer visibility

This commit is contained in:
Chumva 2018-08-17 13:32:35 +03:00
parent 85d71779f0
commit ea0ad82805
2 changed files with 2 additions and 2 deletions

View file

@ -319,7 +319,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
openOnMapView?.setOnClickListener(null)
}
if (location != null && item.latLon != null) {
holder.locationViewContainer?.visibility = View.VISIBLE
holder.locationViewContainer?.visibility = if (item.lastUpdated > 0) View.VISIBLE else View.INVISIBLE
locationViewCache.outdatedLocation = System.currentTimeMillis() / 1000 - item.lastUpdated > settings.staleLocTime
app.uiUtils.updateLocationView(
holder.directionIcon,

View file

@ -296,7 +296,7 @@ class SetTimeDialogFragment : DialogFragment(), TelegramLocationListener, Telegr
holder.description?.visibility = View.VISIBLE
holder.description?.text = getListItemLiveTimeDescr(lastUpdated)
holder.locationViewContainer?.visibility = View.VISIBLE
holder.locationViewContainer?.visibility = if (lastUpdated > 0) View.VISIBLE else View.INVISIBLE
locationViewCache.outdatedLocation = System.currentTimeMillis() / 1000 -
lastUpdated > settings.staleLocTime