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 bc7c5df8..935bcff4 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt @@ -54,7 +54,6 @@ class CloudConnectionListPresenter @Inject constructor( // ) : Presenter(exceptionMappings) { private val selectedCloudType = AtomicReference() - private var defaultLocalStorageCloud: LocalStorageCloud? = null fun setSelectedCloudType(selectedCloudType: CloudTypeModel) { this.selectedCloudType.set(selectedCloudType) } @@ -64,17 +63,7 @@ class CloudConnectionListPresenter @Inject constructor( // .withCloudType(CloudTypeModel.valueOf(selectedCloudType.get())) // .run(object : DefaultResultHandler>() { override fun onSuccess(clouds: List) { - val cloudModels: MutableList = ArrayList() - clouds.forEach { cloud -> - if (CloudTypeModel.LOCAL == selectedCloudType.get()) { - if ((cloud as LocalStorageCloud).rootUri() == null) { - defaultLocalStorageCloud = cloud - return@forEach - } - } - cloudModels.add(cloudModelMapper.toModel(cloud)) - } - view?.showCloudModels(cloudModels) + view?.showCloudModels(clouds.map { cloud -> cloudModelMapper.toModel(cloud) }) } }) }