mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
Revert "Fixed Iran region has no videos in feed"
This commit is contained in:
parent
79aee960a1
commit
33529cffee
@ -53,16 +53,10 @@ class HomeFragment : BaseFragment() {
|
|||||||
LocaleHelper
|
LocaleHelper
|
||||||
.getDetectedCountry(requireContext(), "UK")
|
.getDetectedCountry(requireContext(), "UK")
|
||||||
.uppercase()
|
.uppercase()
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
regionPref
|
regionPref
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iran has no trending videos to show!
|
|
||||||
if (region == "IR"){
|
|
||||||
region = "US"
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.recview.layoutManager = GridLayoutManager(view.context, grid.toInt())
|
binding.recview.layoutManager = GridLayoutManager(view.context, grid.toInt())
|
||||||
fetchJson()
|
fetchJson()
|
||||||
binding.homeRefresh.isEnabled = true
|
binding.homeRefresh.isEnabled = true
|
||||||
@ -91,9 +85,6 @@ class HomeFragment : BaseFragment() {
|
|||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
binding.progressBar.visibility = View.GONE
|
binding.progressBar.visibility = View.GONE
|
||||||
binding.recview.adapter = TrendingAdapter(response, childFragmentManager)
|
binding.recview.adapter = TrendingAdapter(response, childFragmentManager)
|
||||||
if (response.isEmpty()){
|
|
||||||
Toast.makeText(context, "No videos found! Change your region and try again!", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user