Fix deleting cloud a also removes vaults of cloud b of the same type

Fixes #414
This commit is contained in:
Julian Raufelder 2022-02-15 13:04:20 +01:00
parent 7e25b3cd40
commit 4d7b5f2971
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D

View File

@ -93,7 +93,7 @@ class CloudConnectionListPresenter @Inject constructor( //
}
private fun vaultsFor(cloudModel: CloudModel, allVaults: List<Vault>): ArrayList<Vault> {
return allVaults.filterTo(ArrayList()) { it.cloud.type() == cloudModel.toCloud().type() }
return allVaults.filterTo(ArrayList()) { it.cloud.id() == cloudModel.toCloud().id() }
}
fun onDeleteCloudConnectionAndVaults(cloudModel: CloudModel, vaultsOfCloud: ArrayList<Vault>) {