improvement: Always allow a user to delete a failed cipher
This commit is contained in:
parent
e3be565699
commit
7cb9e8adbe
@ -575,7 +575,15 @@ fun RememberStateFlowScope.createCipherSelectionFlow(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canDelete && selectedCiphers.all { it.deletedDate != null || it.service.remote == null }) {
|
if (
|
||||||
|
canDelete &&
|
||||||
|
selectedCiphers
|
||||||
|
.all {
|
||||||
|
it.deletedDate != null ||
|
||||||
|
it.service.remote == null ||
|
||||||
|
it.hasError
|
||||||
|
}
|
||||||
|
) {
|
||||||
actions += cipherDeleteAction(
|
actions += cipherDeleteAction(
|
||||||
removeCipherById = toolbox.removeCipherById,
|
removeCipherById = toolbox.removeCipherById,
|
||||||
ciphers = selectedCiphers,
|
ciphers = selectedCiphers,
|
||||||
|
@ -712,7 +712,12 @@ fun vaultViewScreenState(
|
|||||||
cipherDeleteAction(
|
cipherDeleteAction(
|
||||||
removeCipherById = removeCipherById,
|
removeCipherById = removeCipherById,
|
||||||
ciphers = listOf(secretOrNull),
|
ciphers = listOf(secretOrNull),
|
||||||
).takeIf { canDelete && (secretOrNull.deletedDate != null || secretOrNull.service.remote == null) },
|
).takeIf {
|
||||||
|
canDelete &&
|
||||||
|
(secretOrNull.deletedDate != null ||
|
||||||
|
secretOrNull.service.remote == null ||
|
||||||
|
secretOrNull.hasError)
|
||||||
|
},
|
||||||
),
|
),
|
||||||
primaryAction = primaryAction,
|
primaryAction = primaryAction,
|
||||||
items = oh(
|
items = oh(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user