feat: implement account removal for pCloud
This commit is contained in:
parent
9cc585eaf8
commit
bd2bfa9724
@ -7,6 +7,7 @@ import org.cryptomator.presentation.R
|
|||||||
import org.cryptomator.presentation.model.CloudModel
|
import org.cryptomator.presentation.model.CloudModel
|
||||||
import org.cryptomator.presentation.model.CloudTypeModel
|
import org.cryptomator.presentation.model.CloudTypeModel
|
||||||
import org.cryptomator.presentation.model.LocalStorageModel
|
import org.cryptomator.presentation.model.LocalStorageModel
|
||||||
|
import org.cryptomator.presentation.model.PCloudCloudModel
|
||||||
import org.cryptomator.presentation.model.WebDavCloudModel
|
import org.cryptomator.presentation.model.WebDavCloudModel
|
||||||
import kotlinx.android.synthetic.main.dialog_bottom_sheet_cloud_settings.change_cloud
|
import kotlinx.android.synthetic.main.dialog_bottom_sheet_cloud_settings.change_cloud
|
||||||
import kotlinx.android.synthetic.main.dialog_bottom_sheet_cloud_settings.delete_cloud
|
import kotlinx.android.synthetic.main.dialog_bottom_sheet_cloud_settings.delete_cloud
|
||||||
@ -28,6 +29,7 @@ class CloudConnectionSettingsBottomSheet : BaseBottomSheet<CloudConnectionSettin
|
|||||||
|
|
||||||
when (cloudModel.cloudType()) {
|
when (cloudModel.cloudType()) {
|
||||||
CloudTypeModel.WEBDAV -> bindViewForWebDAV(cloudModel as WebDavCloudModel)
|
CloudTypeModel.WEBDAV -> bindViewForWebDAV(cloudModel as WebDavCloudModel)
|
||||||
|
CloudTypeModel.PCLOUD -> bindViewForPCloud(cloudModel as PCloudCloudModel)
|
||||||
CloudTypeModel.LOCAL -> bindViewForLocal(cloudModel as LocalStorageModel)
|
CloudTypeModel.LOCAL -> bindViewForLocal(cloudModel as LocalStorageModel)
|
||||||
else -> throw IllegalStateException("Cloud model is not binded in the view")
|
else -> throw IllegalStateException("Cloud model is not binded in the view")
|
||||||
}
|
}
|
||||||
@ -59,6 +61,11 @@ class CloudConnectionSettingsBottomSheet : BaseBottomSheet<CloudConnectionSettin
|
|||||||
tv_cloud_subtext.text = cloudModel.username()
|
tv_cloud_subtext.text = cloudModel.username()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun bindViewForPCloud(cloudModel: PCloudCloudModel) {
|
||||||
|
change_cloud.visibility = View.GONE
|
||||||
|
tv_cloud_name.text = cloudModel.username()
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private const val CLOUD_NODE_ARG = "cloudModel"
|
private const val CLOUD_NODE_ARG = "cloudModel"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user