Fixed lint issues

This commit is contained in:
Nite 2021-10-10 14:15:03 +02:00
parent 4b4853374c
commit 381e29b2d1
No known key found for this signature in database
GPG Key ID: 1D1AD59B1C6386C1
2 changed files with 9 additions and 7 deletions

View File

@ -19,7 +19,6 @@ import androidx.core.view.GravityCompat
import androidx.drawerlayout.widget.DrawerLayout
import androidx.fragment.app.FragmentContainerView
import androidx.navigation.NavController
import androidx.navigation.Navigation
import androidx.navigation.findNavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.AppBarConfiguration
@ -186,10 +185,13 @@ class NavigationActivity : AppCompatActivity() {
nowPlayingEventDistributor.subscribe(nowPlayingEventListener)
themeChangedEventDistributor.subscribe(themeChangedEventListener)
serverRepository.liveServerCount().observe(this, { count ->
cachedServerCount = count ?: 0
setSelectServerButtonText()
})
serverRepository.liveServerCount().observe(
this,
{ count ->
cachedServerCount = count ?: 0
setSelectServerButtonText()
}
)
ActiveServerProvider.liveActiveServerId.observe(this, { setSelectServerButtonText() })
}
@ -251,7 +253,8 @@ class NavigationActivity : AppCompatActivity() {
bookmarksMenuItem = navigationView?.menu?.findItem(R.id.bookmarksFragment)
sharesMenuItem = navigationView?.menu?.findItem(R.id.sharesFragment)
podcastsMenuItem = navigationView?.menu?.findItem(R.id.podcastFragment)
selectServerButton = navigationView?.getHeaderView(0)?.findViewById(R.id.header_select_server)
selectServerButton =
navigationView?.getHeaderView(0)?.findViewById(R.id.header_select_server)
selectServerButton?.setOnClickListener {
if (drawerLayout?.isDrawerVisible(GravityCompat.START) == true)
this.drawerLayout?.closeDrawer(GravityCompat.START)

View File

@ -1,6 +1,5 @@
package org.moire.ultrasonic.data
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.room.Room
import kotlinx.coroutines.Dispatchers