correct???

This commit is contained in:
aayush262 2023-12-12 15:30:31 +05:30
parent 5c4e9d7696
commit cc98e2f307
6 changed files with 17 additions and 12 deletions

View file

@ -21,6 +21,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import ani.dantotsu.App
import ani.dantotsu.R
import ani.dantotsu.Refresh
import ani.dantotsu.bottomBar
@ -114,8 +115,9 @@ class HomeFragment : Fragment() {
snackString(currContext()?.getString(R.string.please_reload))
}
}
val settings = loadData("incognito") ?: false
if(settings) {
val incognito = currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
?.getBoolean("incognito", false) ?: false
if(incognito) {
binding.incognitoTextView.visibility = View.VISIBLE
binding.incognitoView.visibility = View.VISIBLE
}