Better incognito (visually)

toggle for navbar in list
This commit is contained in:
aayush262 2023-12-11 21:39:23 +05:30
parent b180625636
commit 5c4e9d7696
18 changed files with 125 additions and 30 deletions

View file

@ -1156,14 +1156,17 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
}
preloading = false
val setting = loadData("incognito") ?: false
val showProgressDialog =
if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog")
?: true else false
if (showProgressDialog && Anilist.userid != null && if (media.isAdult) settings.updateForH else true)
AlertDialog.Builder(this, R.style.MyPopup)
.setTitle(getString(R.string.auto_update, media.userPreferredName))
.setMessage(getString(R.string.incognito_will_not_update))
.apply {
if (setting) {
setMessage(getString(R.string.incognito_will_not_update))
}
setOnCancelListener { hideSystemBars() }
setCancelable(false)
setPositiveButton(getString(R.string.yes)) { dialog, _ ->

View file

@ -796,6 +796,7 @@ class MangaReaderActivity : AppCompatActivity() {
private fun progress(runnable: Runnable) {
if (maxChapterPage - currentChapterPage <= 1 && Anilist.userid != null) {
if (showProgressDialog) {
val dialogView = layoutInflater.inflate(R.layout.item_custom_dialog, null)
val checkbox = dialogView.findViewById<CheckBox>(R.id.dialog_checkbox)
checkbox.text = getString(R.string.dont_ask_again, media.userPreferredName)
@ -803,9 +804,14 @@ class MangaReaderActivity : AppCompatActivity() {
saveData("${media.id}_progressDialog", isChecked)
showProgressDialog = !isChecked
}
val setting = loadData("incognito") ?: false
AlertDialog.Builder(this, R.style.MyPopup)
.setTitle(getString(R.string.title_update_progress))
.apply {
if (setting) {
setMessage(getString(R.string.incognito_will_not_update))
}
}
.setView(dialogView)
.setCancelable(false)
.setPositiveButton(getString(R.string.yes)) { dialog, _ ->

View file

@ -62,7 +62,7 @@ class ListActivity : AppCompatActivity() {
binding.listTabLayout.setTabTextColors(secondaryTextColor, primaryTextColor)
binding.listTabLayout.setSelectedTabIndicatorColor(primaryTextColor)
val uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
if (!uiSettings.immersiveMode) {
if (!uiSettings.immersiveModeList) {
this.window.statusBarColor =
ContextCompat.getColor(this, R.color.nav_bg_inv)
binding.root.fitsSystemWindows = true