From 4d7b5f297182b4a76372fd8a6f9f67051b1706e0 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Tue, 15 Feb 2022 13:04:20 +0100 Subject: [PATCH] Fix deleting cloud a also removes vaults of cloud b of the same type Fixes #414 --- .../presentation/presenter/CloudConnectionListPresenter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt index 23890000..1beb659f 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt @@ -93,7 +93,7 @@ class CloudConnectionListPresenter @Inject constructor( // } private fun vaultsFor(cloudModel: CloudModel, allVaults: List): ArrayList { - 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) {