home: dont hide existing items during load
This commit is contained in:
@@ -152,7 +152,7 @@ class AlbumListFragment :
|
||||
|
||||
private fun updateAlbums(albums: List<Album>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible = indexingState !is IndexingState.Completed || albums.isEmpty()
|
||||
homeRecycler.isInvisible = albums.isEmpty()
|
||||
homeNoMusic.isInvisible =
|
||||
indexingState !is IndexingState.Completed || albums.isNotEmpty()
|
||||
}
|
||||
|
||||
@@ -127,8 +127,7 @@ class ArtistListFragment :
|
||||
|
||||
private fun updateArtists(artists: List<Artist>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible =
|
||||
indexingState !is IndexingState.Completed || artists.isEmpty()
|
||||
homeRecycler.isInvisible = artists.isEmpty()
|
||||
homeNoMusic.isInvisible =
|
||||
indexingState !is IndexingState.Completed || artists.isNotEmpty()
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ class GenreListFragment :
|
||||
|
||||
private fun updateGenres(genres: List<Genre>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible = indexingState !is IndexingState.Completed || genres.isEmpty()
|
||||
homeRecycler.isInvisible = genres.isEmpty()
|
||||
homeNoMusic.isInvisible =
|
||||
indexingState !is IndexingState.Completed || genres.isNotEmpty()
|
||||
}
|
||||
|
||||
@@ -124,8 +124,7 @@ class PlaylistListFragment :
|
||||
|
||||
private fun updatePlaylists(playlists: List<Playlist>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible =
|
||||
indexingState !is IndexingState.Completed || playlists.isEmpty()
|
||||
homeRecycler.isInvisible = playlists.isEmpty()
|
||||
homeNoMusic.isInvisible =
|
||||
indexingState !is IndexingState.Completed || playlists.isNotEmpty()
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class SongListFragment :
|
||||
|
||||
private fun updateSongs(songs: List<Song>, indexingState: IndexingState?) {
|
||||
requireBinding().apply {
|
||||
homeRecycler.isInvisible = indexingState !is IndexingState.Completed || songs.isEmpty()
|
||||
homeRecycler.isInvisible = songs.isEmpty()
|
||||
homeNoMusic.isInvisible =
|
||||
indexingState !is IndexingState.Completed || songs.isNotEmpty()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user