incognito header fix

This commit is contained in:
rebelonion 2024-01-17 01:45:41 -06:00
parent 4e6842862e
commit 51a5609395
12 changed files with 185 additions and 96 deletions

View file

@ -93,7 +93,6 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
)
}
setIncognito()
binding.animeSearchBar.setEndIconOnClickListener {
binding.animeSearchBarText.performClick()
}
@ -150,19 +149,6 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
trendingViewPager!!.updateLayoutParams { height += statusBarHeight }
}
fun setIncognito() {
val incognito = currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
?.getBoolean("incognito", false) ?: false
if (incognito) {
binding.incognitoTextView.visibility = View.VISIBLE
if (!uiSettings.immersiveMode) {
binding.root.fitsSystemWindows = true
}
} else {
binding.incognitoTextView.visibility = View.GONE
}
}
fun updateTrending(adaptor: MediaAdaptor) {
binding.animeTrendingProgressBar.visibility = View.GONE
binding.animeTrendingViewPager.adapter = adaptor