Remove force null check
This commit is contained in:
parent
12f6f0a505
commit
8d8149839a
7 changed files with 48 additions and 34 deletions
|
@ -117,7 +117,7 @@ class ArtistsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<Artist
|
|||
|
||||
companion object {
|
||||
@JvmField
|
||||
val TAG = ArtistsFragment::class.java.simpleName
|
||||
val TAG: String = ArtistsFragment::class.java.simpleName
|
||||
|
||||
fun newInstance(): ArtistsFragment {
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class GenresFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearL
|
|||
|
||||
companion object {
|
||||
@JvmField
|
||||
val TAG = GenresFragment::class.java.simpleName
|
||||
val TAG: String = GenresFragment::class.java.simpleName
|
||||
|
||||
fun newInstance(): GenresFragment {
|
||||
return GenresFragment()
|
||||
|
|
|
@ -60,11 +60,11 @@ class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, L
|
|||
}
|
||||
|
||||
override fun showEmptyView() {
|
||||
adapter!!.swapDataSet(ArrayList())
|
||||
adapter?.swapDataSet(ArrayList())
|
||||
}
|
||||
|
||||
override fun playlists(playlists: ArrayList<Playlist>) {
|
||||
adapter!!.swapDataSet(playlists)
|
||||
adapter?.swapDataSet(playlists)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
|
@ -77,7 +77,7 @@ class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, L
|
|||
|
||||
companion object {
|
||||
@JvmField
|
||||
val TAG = PlaylistsFragment::class.java.simpleName
|
||||
val TAG: String = PlaylistsFragment::class.java.simpleName
|
||||
|
||||
fun newInstance(): PlaylistsFragment {
|
||||
val args = Bundle()
|
||||
|
|
|
@ -83,12 +83,12 @@ class SongsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdap
|
|||
}
|
||||
|
||||
public override fun setUsePalette(usePalette: Boolean) {
|
||||
adapter!!.usePalette(usePalette)
|
||||
adapter?.usePalette(usePalette)
|
||||
}
|
||||
|
||||
override fun setGridSize(gridSize: Int) {
|
||||
layoutManager!!.spanCount = gridSize
|
||||
adapter!!.notifyDataSetChanged()
|
||||
layoutManager?.spanCount = gridSize
|
||||
adapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -104,7 +104,7 @@ class SongsFragment : AbsLibraryPagerRecyclerViewCustomGridSizeFragment<SongAdap
|
|||
}
|
||||
|
||||
override fun showEmptyView() {
|
||||
adapter!!.swapDataSet(ArrayList())
|
||||
adapter?.swapDataSet(ArrayList())
|
||||
}
|
||||
|
||||
override fun loadSortOrder(): String {
|
||||
|
|
|
@ -60,6 +60,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
|||
|
||||
if (sections.isEmpty()) {
|
||||
showEmptyView()
|
||||
shortcuts.visibility = View.GONE
|
||||
} else {
|
||||
emptyContainer.hide()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue