incognito header fix
This commit is contained in:
parent
4e6842862e
commit
51a5609395
12 changed files with 185 additions and 96 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue