home: fix no music indicator display
This commit is contained in:
parent
ae449ded45
commit
dd3b411beb
5 changed files with 10 additions and 11 deletions
|
@ -151,8 +151,8 @@ class AlbumListFragment :
|
|||
|
||||
private fun updateAlbums(albums: List<Album>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible = indexingState is IndexingState.Indexing || albums.isEmpty()
|
||||
homeNoMusic.isInvisible = albums.isEmpty()
|
||||
homeRecycler.isInvisible = indexingState == null || albums.isEmpty()
|
||||
homeNoMusic.isInvisible = indexingState != null || albums.isNotEmpty()
|
||||
}
|
||||
albumAdapter.update(albums, homeModel.albumInstructions.consume())
|
||||
}
|
||||
|
|
|
@ -127,8 +127,8 @@ class ArtistListFragment :
|
|||
|
||||
private fun updateArtists(artists: List<Artist>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible = indexingState is IndexingState.Indexing || artists.isEmpty()
|
||||
homeNoMusic.isInvisible = artists.isEmpty()
|
||||
homeRecycler.isInvisible = indexingState == null || artists.isEmpty()
|
||||
homeNoMusic.isInvisible = indexingState != null || artists.isNotEmpty()
|
||||
}
|
||||
artistAdapter.update(artists, homeModel.artistInstructions.consume())
|
||||
}
|
||||
|
|
|
@ -126,8 +126,8 @@ class GenreListFragment :
|
|||
|
||||
private fun updateGenres(genres: List<Genre>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible = indexingState is IndexingState.Indexing || genres.isEmpty()
|
||||
homeNoMusic.isInvisible = genres.isEmpty()
|
||||
homeRecycler.isInvisible = indexingState == null || genres.isEmpty()
|
||||
homeNoMusic.isInvisible = indexingState != null || genres.isNotEmpty()
|
||||
}
|
||||
genreAdapter.update(genres, homeModel.genreInstructions.consume())
|
||||
}
|
||||
|
|
|
@ -124,9 +124,8 @@ class PlaylistListFragment :
|
|||
|
||||
private fun updatePlaylists(playlists: List<Playlist>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible =
|
||||
indexingState is IndexingState.Indexing || playlists.isEmpty()
|
||||
homeNoMusic.isInvisible = playlists.isEmpty()
|
||||
homeRecycler.isInvisible = indexingState == null || playlists.isEmpty()
|
||||
homeNoMusic.isInvisible = indexingState != null || playlists.isNotEmpty()
|
||||
}
|
||||
playlistAdapter.update(playlists, homeModel.playlistInstructions.consume())
|
||||
}
|
||||
|
|
|
@ -151,8 +151,8 @@ class SongListFragment :
|
|||
|
||||
private fun updateSongs(songs: List<Song>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible = indexingState is IndexingState.Indexing || songs.isEmpty()
|
||||
homeNoMusic.isInvisible = songs.isEmpty()
|
||||
homeRecycler.isInvisible = indexingState == null || songs.isEmpty()
|
||||
homeNoMusic.isInvisible = indexingState != null || songs.isNotEmpty()
|
||||
}
|
||||
songAdapter.update(songs, homeModel.songInstructions.consume())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue