From 4cd1a344ba9a668c9f7dbb9992ddcbeede4de5a4 Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 10 Aug 2018 13:10:57 +0300 Subject: [PATCH] refactor options button setup --- .../src/net/osmand/telegram/ui/MyLocationTabFragment.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index cacb222ef8..573e687f99 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -111,11 +111,12 @@ class MyLocationTabFragment : Fragment(), TelegramListener, ChatLiveMessagesList setImageResource(R.drawable.img_my_location_user) } - optionsBtn = mainView.findViewById(R.id.options) - (activity as MainActivity).setupOptionsBtn(optionsBtn) + with(activity as MainActivity) { + optionsBtn = mainView.findViewById(R.id.options) + activity.setupOptionsBtn(optionsBtn) + activity.setupOptionsBtn(mainView.findViewById(R.id.options_title)) + } - activity.setupOptionsBtn(mainView.findViewById(R.id.options_title)) - imageContainer = mainView.findViewById(R.id.image_container) titleContainer = mainView.findViewById(R.id.title_container).apply { AndroidUtils.addStatusBarPadding19v(context, this)