diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt index a5a952266a..fca10cbc0e 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt @@ -65,7 +65,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage layoutManager = LinearLayoutManager(context) adapter = this@LiveNowTabFragment.adapter addOnScrollListener(object : RecyclerView.OnScrollListener() { - override fun onScrollStateChanged(recyclerView: RecyclerView?, newState: Int) { + override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { super.onScrollStateChanged(recyclerView, newState) locationUiUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE when (newState) { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index 8f54601ebd..1167057ae1 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -86,7 +86,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener { appBarOutlineProvider = outlineProvider outlineProvider = null } - addOnOffsetChangedListener { appBar, offset -> + addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { appBar, offset -> if (appBarScrollRange == -1) { appBarScrollRange = appBar.totalScrollRange } @@ -97,7 +97,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener { adjustAppbar() optionsBtn.visibility = if (collapsed) View.VISIBLE else View.GONE } - } + }) } userImage = mainView.findViewById(R.id.my_location_user_image).apply {