From e373cabc96e8e73ddcbe74dd610263e8524bf842 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Wed, 13 Apr 2022 16:27:48 +0200 Subject: [PATCH] Remove legacy code --- .../presenter/CloudConnectionListPresenter.kt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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) }) } }) }