remove unnecessary apply

This commit is contained in:
Chumva 2018-08-10 13:06:11 +03:00
parent cf47b3c4c0
commit 79fe8ae039
2 changed files with 6 additions and 11 deletions

View file

@ -77,10 +77,8 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
})
}
mainView.findViewById<ImageView>(R.id.options).apply {
(activity as MainActivity).setupOptionsBtn(this)
}
(activity as MainActivity).setupOptionsBtn(mainView.findViewById<ImageView>(R.id.options))
openOsmAndBtn = mainView.findViewById<View>(R.id.open_osmand_btn).apply {
setOnClickListener {
activity?.packageManager?.getLaunchIntentForPackage(OsmandAidlHelper.OSMAND_PACKAGE_NAME)

View file

@ -111,13 +111,10 @@ class MyLocationTabFragment : Fragment(), TelegramListener, ChatLiveMessagesList
setImageResource(R.drawable.img_my_location_user)
}
optionsBtn = mainView.findViewById<ImageView>(R.id.options).apply {
(activity as MainActivity).setupOptionsBtn(this)
}
mainView.findViewById<ImageView>(R.id.options_title).apply {
(activity as MainActivity).setupOptionsBtn(this)
}
optionsBtn = mainView.findViewById<ImageView>(R.id.options)
(activity as MainActivity).setupOptionsBtn(optionsBtn)
activity.setupOptionsBtn(mainView.findViewById<ImageView>(R.id.options_title))
imageContainer = mainView.findViewById<FrameLayout>(R.id.image_container)
titleContainer = mainView.findViewById<LinearLayout>(R.id.title_container).apply {