incognito does not require app restart
This commit is contained in:
parent
a8711241a7
commit
42c3b42c05
9 changed files with 121 additions and 60 deletions
|
@ -157,6 +157,19 @@ 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