Fixed lint issues
This commit is contained in:
parent
4b4853374c
commit
381e29b2d1
|
@ -19,7 +19,6 @@ import androidx.core.view.GravityCompat
|
||||||
import androidx.drawerlayout.widget.DrawerLayout
|
import androidx.drawerlayout.widget.DrawerLayout
|
||||||
import androidx.fragment.app.FragmentContainerView
|
import androidx.fragment.app.FragmentContainerView
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import androidx.navigation.Navigation
|
|
||||||
import androidx.navigation.findNavController
|
import androidx.navigation.findNavController
|
||||||
import androidx.navigation.fragment.NavHostFragment
|
import androidx.navigation.fragment.NavHostFragment
|
||||||
import androidx.navigation.ui.AppBarConfiguration
|
import androidx.navigation.ui.AppBarConfiguration
|
||||||
|
@ -186,10 +185,13 @@ class NavigationActivity : AppCompatActivity() {
|
||||||
nowPlayingEventDistributor.subscribe(nowPlayingEventListener)
|
nowPlayingEventDistributor.subscribe(nowPlayingEventListener)
|
||||||
themeChangedEventDistributor.subscribe(themeChangedEventListener)
|
themeChangedEventDistributor.subscribe(themeChangedEventListener)
|
||||||
|
|
||||||
serverRepository.liveServerCount().observe(this, { count ->
|
serverRepository.liveServerCount().observe(
|
||||||
|
this,
|
||||||
|
{ count ->
|
||||||
cachedServerCount = count ?: 0
|
cachedServerCount = count ?: 0
|
||||||
setSelectServerButtonText()
|
setSelectServerButtonText()
|
||||||
})
|
}
|
||||||
|
)
|
||||||
ActiveServerProvider.liveActiveServerId.observe(this, { setSelectServerButtonText() })
|
ActiveServerProvider.liveActiveServerId.observe(this, { setSelectServerButtonText() })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +253,8 @@ class NavigationActivity : AppCompatActivity() {
|
||||||
bookmarksMenuItem = navigationView?.menu?.findItem(R.id.bookmarksFragment)
|
bookmarksMenuItem = navigationView?.menu?.findItem(R.id.bookmarksFragment)
|
||||||
sharesMenuItem = navigationView?.menu?.findItem(R.id.sharesFragment)
|
sharesMenuItem = navigationView?.menu?.findItem(R.id.sharesFragment)
|
||||||
podcastsMenuItem = navigationView?.menu?.findItem(R.id.podcastFragment)
|
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 {
|
selectServerButton?.setOnClickListener {
|
||||||
if (drawerLayout?.isDrawerVisible(GravityCompat.START) == true)
|
if (drawerLayout?.isDrawerVisible(GravityCompat.START) == true)
|
||||||
this.drawerLayout?.closeDrawer(GravityCompat.START)
|
this.drawerLayout?.closeDrawer(GravityCompat.START)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.moire.ultrasonic.data
|
package org.moire.ultrasonic.data
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData
|
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.room.Room
|
import androidx.room.Room
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
|
Loading…
Reference in New Issue