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