Skip to content

Commit

Permalink
Remove unsafe cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliano101 committed Dec 19, 2024
1 parent 488cac2 commit f0a02b5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ class SearchFragment : Fragment() {

binding.suggestList.visibility = View.GONE
binding.suggestListYtItem.visibility = View.GONE
if (viewModel.searchAllResult.value == null || viewModel.searchAllResult.value!!.isEmpty) {
if (searchHistory.isEmpty) {
if (viewModel.searchAllResult.value == null || viewModel.searchAllResult.value!!.isEmpty()) {
if (searchHistory.isEmpty()) {
binding.recentlyQueryView.visibility = View.GONE
binding.defaultLayout.visibility = View.VISIBLE
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,47 +604,47 @@ class ArtistFragment : Fragment() {
tvDescription.originalText = (it.description ?: getString(R.string.no_description)).toString()
if (it.songs?.results != null) {
popularAdapter.updateList(it.songs.results as ArrayList<ResultSong>)
if (it.songs.results.isEmpty) {
if (it.songs.results.isEmpty()) {
binding.tvPopular.visibility = View.GONE
}
} else {
binding.tvPopular.visibility = View.GONE
}
if (it.singles?.results != null) {
singlesAdapter.updateList(it.singles.results as ArrayList<ResultSingle>)
if (it.singles.results.isEmpty) {
if (it.singles.results.isEmpty()) {
binding.tvSingles.visibility = View.GONE
}
} else {
binding.tvSingles.visibility = View.GONE
}
if (it.albums?.results != null) {
albumsAdapter.updateList(it.albums.results as ArrayList<ResultAlbum>)
if (it.albums.results.isEmpty) {
if (it.albums.results.isEmpty()) {
binding.tvAlbums.visibility = View.GONE
}
} else {
binding.tvAlbums.visibility = View.GONE
}
if (it.video != null) {
videoAdapter.updateList(it.video as ArrayList<ResultVideo>)
if (it.video.isEmpty) {
if (it.video.isEmpty()) {
binding.tvVideo.visibility = View.GONE
}
} else {
binding.tvVideo.visibility = View.GONE
}
if (it.featuredOn != null) {
featuredOnAdapter.updateList(it.featuredOn as ArrayList<ResultPlaylist>)
if (it.featuredOn.isEmpty) {
if (it.featuredOn.isEmpty()) {
binding.tvFeaturedOn.visibility = View.GONE
}
} else {
binding.tvFeaturedOn.visibility = View.GONE
}
if (it.related?.results != null) {
relatedArtistsAdapter.updateList(it.related.results as ArrayList<ResultRelated>)
if (it.related.results.isEmpty) {
if (it.related.results.isEmpty()) {
binding.tvRelatedArtists.visibility = View.GONE
}
} else {
Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
# org.gradle.parallel=true
#Fri Nov 08 00:03:25 ICT 2024
android.enableJetifier=false
android.nonFinalResIds=false
android.nonFinalResIds=true
android.nonTransitiveRClass=true
android.useAndroidX=true
kotlin.code.style=official
kotlin.jvm.target.validation.mode=IGNORE
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m
org.gradle.unsafe.configuration-cache=true
org.gradle.configuration-cache=true
# Build optimization
org.gradle.parallel=true
org.gradle.configureondemand=true

0 comments on commit f0a02b5

Please sign in to comment.