Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit a064116

Browse files
committed
fix: only show cache checkbox when enabled
1 parent 080387c commit a064116

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/app/passwordstore/ui/crypto/PasswordDialog.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import android.os.Bundle
1111
import android.view.KeyEvent
1212
import android.view.WindowManager
1313
import androidx.core.os.bundleOf
14+
import androidx.core.view.isVisible
1415
import androidx.core.widget.doOnTextChanged
1516
import androidx.fragment.app.DialogFragment
1617
import androidx.fragment.app.setFragmentResult
@@ -32,7 +33,10 @@ class PasswordDialog : DialogFragment() {
3233
builder.setView(binding.root)
3334
builder.setTitle(R.string.password)
3435

35-
if (requireArguments().getBoolean(CACHE_ENABLED_EXTRA, false)) {
36+
val cacheEnabled = requireArguments().getBoolean(CACHE_ENABLED_EXTRA, false)
37+
binding.autoClearCache.isVisible = cacheEnabled
38+
39+
if (cacheEnabled) {
3640
clearCacheChecked = requireArguments().getBoolean(AUTO_CLEAR_CACHE_EXTRA)
3741
binding.autoClearCache.isChecked = clearCacheChecked
3842
binding.autoClearCache.setOnCheckedChangeListener { _, isChecked ->

0 commit comments

Comments
 (0)