diff --git a/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml b/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml index 1e17666d37..9ba29bf961 100644 --- a/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml +++ b/OsmAnd-telegram/res/layout/fragment_my_location_tab.xml @@ -163,10 +163,8 @@ android:id="@+id/options_title" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_marginEnd="@dimen/content_padding_standard" android:layout_marginLeft="@dimen/content_padding_standard" android:layout_marginRight="@dimen/content_padding_standard" - android:layout_marginStart="@dimen/content_padding_standard" android:background="?attr/selectableItemBackgroundBorderless" android:paddingLeft="@dimen/content_padding_half" android:paddingRight="@dimen/content_padding_half" diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index 1bb4d6926d..b202725823 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -528,20 +528,32 @@ class MyLocationTabFragment : Fragment(), TelegramListener, ChatLiveMessagesList notifyItemChanged(position) } } - val stopDescription = "${getText(R.string.stop_at)}:" - holder.stopSharingDescr?.text = stopDescription + holder.stopSharingDescr?.apply { + visibility = View.VISIBLE + val stopDescription = "${getText(R.string.stop_at)}:" + text = stopDescription + } - holder.stopSharingFirstPart?.text = OsmandFormatter.getFormattedTime(expiresIn) + holder.stopSharingFirstPart?.apply { + visibility = View.VISIBLE + text = OsmandFormatter.getFormattedTime(expiresIn) + } - val stopSharingSecondPart = "(${getString(R.string.in_time, - OsmandFormatter.getFormattedDuration(context!!, expiresIn, true))})" - holder.stopSharingSecondPart?.text = stopSharingSecondPart + holder.stopSharingSecondPart?.apply { + visibility = View.VISIBLE + val stopSharingSecondPart = "(${getString(R.string.in_time, + OsmandFormatter.getFormattedDuration(context!!, expiresIn, true))})" + text = stopSharingSecondPart + } if (expiresIn == 0) { removeItem(chat) } } } else { holder.textInArea?.visibility = View.INVISIBLE + holder.stopSharingDescr?.visibility = View.INVISIBLE + holder.stopSharingFirstPart?.visibility = View.INVISIBLE + holder.stopSharingSecondPart?.visibility = View.INVISIBLE } } }