Update folder in the BrowseFilesFragment too when credentials changed
This commit is contained in:
parent
11f5a61789
commit
db050e04f0
@ -237,7 +237,9 @@ class BrowseFilesPresenter @Inject constructor( //
|
|||||||
}
|
}
|
||||||
|
|
||||||
cloudNode.withCloud(updatedCloud)?.let {
|
cloudNode.withCloud(updatedCloud)?.let {
|
||||||
getCloudList(cloudFolderModelMapper.toModel(it))
|
val folder = cloudFolderModelMapper.toModel(it)
|
||||||
|
view?.updateActiveFolderDueToAuthenticationProblem(folder)
|
||||||
|
getCloudList(folder)
|
||||||
} ?: throw FatalBackendException("cloudFolderModel with updated Cloud shouldn't be null")
|
} ?: throw FatalBackendException("cloudFolderModel with updated Cloud shouldn't be null")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ import org.cryptomator.presentation.ui.dialog.ReplaceDialog
|
|||||||
import org.cryptomator.presentation.ui.dialog.SymLinkDialog
|
import org.cryptomator.presentation.ui.dialog.SymLinkDialog
|
||||||
import org.cryptomator.presentation.ui.dialog.UploadCloudFileDialog
|
import org.cryptomator.presentation.ui.dialog.UploadCloudFileDialog
|
||||||
import org.cryptomator.presentation.ui.fragment.BrowseFilesFragment
|
import org.cryptomator.presentation.ui.fragment.BrowseFilesFragment
|
||||||
import java.util.ArrayList
|
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlinx.android.synthetic.main.toolbar_layout.toolbar
|
import kotlinx.android.synthetic.main.toolbar_layout.toolbar
|
||||||
@ -615,6 +614,10 @@ class BrowseFilesActivity : BaseActivity(), //
|
|||||||
showDialog(NoDirFileDialog.newInstance(cryptoFolderName, cloudFolderPath))
|
showDialog(NoDirFileDialog.newInstance(cryptoFolderName, cloudFolderPath))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun updateActiveFolderDueToAuthenticationProblem(folder: CloudFolderModel) {
|
||||||
|
browseFilesFragment().folder = folder
|
||||||
|
}
|
||||||
|
|
||||||
override fun navigateFolderBackBecauseSymlink() {
|
override fun navigateFolderBackBecauseSymlink() {
|
||||||
onBackPressed()
|
onBackPressed()
|
||||||
}
|
}
|
||||||
|
@ -35,5 +35,6 @@ interface BrowseFilesView : View {
|
|||||||
fun disableSelectionMode()
|
fun disableSelectionMode()
|
||||||
fun showSymLinkDialog()
|
fun showSymLinkDialog()
|
||||||
fun showNoDirFileDialog(cryptoFolderName: String, cloudFolderPath: String)
|
fun showNoDirFileDialog(cryptoFolderName: String, cloudFolderPath: String)
|
||||||
|
fun updateActiveFolderDueToAuthenticationProblem(folder: CloudFolderModel)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,6 @@ import org.cryptomator.presentation.model.ProgressModel
|
|||||||
import org.cryptomator.presentation.presenter.BrowseFilesPresenter
|
import org.cryptomator.presentation.presenter.BrowseFilesPresenter
|
||||||
import org.cryptomator.presentation.ui.adapter.BrowseFilesAdapter
|
import org.cryptomator.presentation.ui.adapter.BrowseFilesAdapter
|
||||||
import org.cryptomator.presentation.util.ResourceHelper.Companion.getPixelOffset
|
import org.cryptomator.presentation.util.ResourceHelper.Companion.getPixelOffset
|
||||||
import java.util.Comparator
|
|
||||||
import java.util.Optional
|
import java.util.Optional
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlinx.android.synthetic.main.floating_action_button_layout.floatingActionButton
|
import kotlinx.android.synthetic.main.floating_action_button_layout.floatingActionButton
|
||||||
@ -51,8 +50,11 @@ class BrowseFilesFragment : BaseFragment() {
|
|||||||
|
|
||||||
private var filterText: String = ""
|
private var filterText: String = ""
|
||||||
|
|
||||||
val folder: CloudFolderModel
|
var folder: CloudFolderModel
|
||||||
get() = requireArguments().getSerializable(ARG_FOLDER) as CloudFolderModel
|
get() = requireArguments().getSerializable(ARG_FOLDER) as CloudFolderModel
|
||||||
|
set(updatedFolder) {
|
||||||
|
arguments?.putSerializable(ARG_FOLDER, updatedFolder)
|
||||||
|
}
|
||||||
|
|
||||||
private val chooseCloudNodeSettings: ChooseCloudNodeSettings?
|
private val chooseCloudNodeSettings: ChooseCloudNodeSettings?
|
||||||
get() = requireArguments().getSerializable(ARG_CHOOSE_CLOUD_NODE_SETTINGS) as ChooseCloudNodeSettings?
|
get() = requireArguments().getSerializable(ARG_CHOOSE_CLOUD_NODE_SETTINGS) as ChooseCloudNodeSettings?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user