Fix small issues caused by increasing api level

This commit is contained in:
Alex Sytnyk 2018-08-09 17:13:12 +03:00
parent 71bf82ab22
commit 6430ae0e3a
2 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
layoutManager = LinearLayoutManager(context) layoutManager = LinearLayoutManager(context)
adapter = this@LiveNowTabFragment.adapter adapter = this@LiveNowTabFragment.adapter
addOnScrollListener(object : RecyclerView.OnScrollListener() { addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView?, newState: Int) { override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState) super.onScrollStateChanged(recyclerView, newState)
locationUiUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE locationUiUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE
when (newState) { when (newState) {

View file

@ -86,7 +86,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
appBarOutlineProvider = outlineProvider appBarOutlineProvider = outlineProvider
outlineProvider = null outlineProvider = null
} }
addOnOffsetChangedListener { appBar, offset -> addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { appBar, offset ->
if (appBarScrollRange == -1) { if (appBarScrollRange == -1) {
appBarScrollRange = appBar.totalScrollRange appBarScrollRange = appBar.totalScrollRange
} }
@ -97,7 +97,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
adjustAppbar() adjustAppbar()
optionsBtn.visibility = if (collapsed) View.VISIBLE else View.GONE optionsBtn.visibility = if (collapsed) View.VISIBLE else View.GONE
} }
} })
} }
userImage = mainView.findViewById<ImageView>(R.id.my_location_user_image).apply { userImage = mainView.findViewById<ImageView>(R.id.my_location_user_image).apply {