Rename NoDirFileDialog
to NoDirFileOrEmptyDialog
This commit is contained in:
parent
a39e5698a9
commit
6bda0f7ab1
@ -214,13 +214,13 @@ class BrowseFilesPresenter @Inject constructor( //
|
||||
return
|
||||
}
|
||||
e is EmptyDirFileException -> {
|
||||
view?.showNoDirFileDialog(e.dirName, e.filePath)
|
||||
view?.showNoDirFileOrEmptyDialog(e.dirName, e.filePath)
|
||||
}
|
||||
e is SymLinkException -> {
|
||||
view?.showSymLinkDialog()
|
||||
}
|
||||
e is NoDirFileException -> {
|
||||
view?.showNoDirFileDialog(e.cryptoFolderName, e.cloudFolderPath)
|
||||
view?.showNoDirFileOrEmptyDialog(e.cryptoFolderName, e.cloudFolderPath)
|
||||
}
|
||||
else -> {
|
||||
super.onError(e)
|
||||
|
@ -45,7 +45,7 @@ import org.cryptomator.presentation.ui.dialog.CreateFolderDialog
|
||||
import org.cryptomator.presentation.ui.dialog.ExportCloudFilesDialog
|
||||
import org.cryptomator.presentation.ui.dialog.FileNameDialog
|
||||
import org.cryptomator.presentation.ui.dialog.FileTypeNotSupportedDialog
|
||||
import org.cryptomator.presentation.ui.dialog.NoDirFileDialog
|
||||
import org.cryptomator.presentation.ui.dialog.NoDirFileOrEmptyDialog
|
||||
import org.cryptomator.presentation.ui.dialog.ReplaceDialog
|
||||
import org.cryptomator.presentation.ui.dialog.SymLinkDialog
|
||||
import org.cryptomator.presentation.ui.dialog.UploadCloudFileDialog
|
||||
@ -64,7 +64,7 @@ class BrowseFilesActivity : BaseActivity(), //
|
||||
UploadCloudFileDialog.Callback,
|
||||
ExportCloudFilesDialog.Callback,
|
||||
SymLinkDialog.CallBack,
|
||||
NoDirFileDialog.CallBack,
|
||||
NoDirFileOrEmptyDialog.CallBack,
|
||||
SearchView.OnQueryTextListener,
|
||||
SearchView.OnCloseListener {
|
||||
|
||||
@ -606,8 +606,8 @@ class BrowseFilesActivity : BaseActivity(), //
|
||||
showDialog(SymLinkDialog.newInstance())
|
||||
}
|
||||
|
||||
override fun showNoDirFileDialog(cryptoFolderName: String, cloudFolderPath: String) {
|
||||
showDialog(NoDirFileDialog.newInstance(cryptoFolderName, cloudFolderPath))
|
||||
override fun showNoDirFileOrEmptyDialog(cryptoFolderName: String, cloudFolderPath: String) {
|
||||
showDialog(NoDirFileOrEmptyDialog.newInstance(cryptoFolderName, cloudFolderPath))
|
||||
}
|
||||
|
||||
override fun updateActiveFolderDueToAuthenticationProblem(folder: CloudFolderModel) {
|
||||
|
@ -34,7 +34,7 @@ interface BrowseFilesView : View {
|
||||
fun updateSelectionTitle(numberSelected: Int)
|
||||
fun disableSelectionMode()
|
||||
fun showSymLinkDialog()
|
||||
fun showNoDirFileDialog(cryptoFolderName: String, cloudFolderPath: String)
|
||||
fun showNoDirFileOrEmptyDialog(cryptoFolderName: String, cloudFolderPath: String)
|
||||
fun updateActiveFolderDueToAuthenticationProblem(folder: CloudFolderModel)
|
||||
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ import androidx.appcompat.app.AlertDialog
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import org.cryptomator.generator.Dialog
|
||||
import org.cryptomator.presentation.R
|
||||
import kotlinx.android.synthetic.main.dialog_no_dir_file.tv_no_dir_file_info
|
||||
import kotlinx.android.synthetic.main.dialog_no_dir_file_or_empty.tv_no_dir_file_or_empty_info
|
||||
|
||||
@Dialog(R.layout.dialog_no_dir_file)
|
||||
class NoDirFileDialog : BaseDialog<NoDirFileDialog.CallBack>() {
|
||||
@Dialog(R.layout.dialog_no_dir_file_or_empty)
|
||||
class NoDirFileOrEmptyDialog : BaseDialog<NoDirFileOrEmptyDialog.CallBack>() {
|
||||
|
||||
interface CallBack {
|
||||
|
||||
@ -33,7 +33,7 @@ class NoDirFileDialog : BaseDialog<NoDirFileDialog.CallBack>() {
|
||||
public override fun setupView() {
|
||||
val cryptoFolderName = requireArguments().getSerializable(ARG_CRYPTO_FOLDER_NAME) as String
|
||||
val cloudFolderPath = requireArguments().getSerializable(ARG_CLOUD_FOLDER_PATH) as String
|
||||
tv_no_dir_file_info.text = String.format(getString(R.string.dialog_no_dir_file_message), cryptoFolderName, cloudFolderPath)
|
||||
tv_no_dir_file_or_empty_info.text = String.format(getString(R.string.dialog_no_dir_file_message), cryptoFolderName, cloudFolderPath)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@ -41,12 +41,12 @@ class NoDirFileDialog : BaseDialog<NoDirFileDialog.CallBack>() {
|
||||
private const val ARG_CRYPTO_FOLDER_NAME = "argCryptoFolderName"
|
||||
private const val ARG_CLOUD_FOLDER_PATH = "argCloudFolderPath"
|
||||
fun newInstance(cryptoFolderName: String, cloudFolderPath: String): DialogFragment {
|
||||
val noDirFileDialog = NoDirFileDialog()
|
||||
val noDirFileOrEmptyDialog = NoDirFileOrEmptyDialog()
|
||||
val args = Bundle()
|
||||
args.putSerializable(ARG_CRYPTO_FOLDER_NAME, cryptoFolderName)
|
||||
args.putSerializable(ARG_CLOUD_FOLDER_PATH, cloudFolderPath)
|
||||
noDirFileDialog.arguments = args
|
||||
return noDirFileDialog
|
||||
noDirFileOrEmptyDialog.arguments = args
|
||||
return noDirFileOrEmptyDialog
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
android:padding="@dimen/activity_vertical_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_dir_file_info"
|
||||
android:id="@+id/tv_no_dir_file_or_empty_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user