incognito header fix
This commit is contained in:
parent
4e6842862e
commit
51a5609395
12 changed files with 185 additions and 96 deletions
|
@ -98,7 +98,6 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
|
|||
dialogFragment.show((it.context as AppCompatActivity).supportFragmentManager, "dialog")
|
||||
}
|
||||
|
||||
setIncognito()
|
||||
binding.mangaSearchBar.setEndIconOnClickListener {
|
||||
binding.mangaSearchBarText.performClick()
|
||||
}
|
||||
|
@ -141,20 +140,6 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
|
|||
fun updateHeight() {
|
||||
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.mangaTrendingProgressBar.visibility = View.GONE
|
||||
binding.mangaTrendingViewPager.adapter = adaptor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue