Remove redundant empty and no DirFile handling
This commit is contained in:
parent
828ba7207d
commit
a8d789440e
@ -101,7 +101,6 @@
|
||||
|
||||
<!-- Settings -->
|
||||
<activity android:name=".ui.activity.AutoUploadChooseVaultActivity" />
|
||||
<activity android:name=".ui.activity.EmptyDirIdFileInfoActivity" />
|
||||
<activity android:name=".ui.activity.BiometricAuthSettingsActivity" />
|
||||
<activity android:name=".ui.activity.CloudConnectionListActivity" />
|
||||
<activity android:name=".ui.activity.CloudSettingsActivity" />
|
||||
|
@ -13,7 +13,6 @@ import org.cryptomator.presentation.ui.activity.ChooseCloudServiceActivity;
|
||||
import org.cryptomator.presentation.ui.activity.CloudConnectionListActivity;
|
||||
import org.cryptomator.presentation.ui.activity.CloudSettingsActivity;
|
||||
import org.cryptomator.presentation.ui.activity.CreateVaultActivity;
|
||||
import org.cryptomator.presentation.ui.activity.EmptyDirIdFileInfoActivity;
|
||||
import org.cryptomator.presentation.ui.activity.ImagePreviewActivity;
|
||||
import org.cryptomator.presentation.ui.activity.LicenseCheckActivity;
|
||||
import org.cryptomator.presentation.ui.activity.LicensesActivity;
|
||||
@ -32,7 +31,6 @@ import org.cryptomator.presentation.ui.fragment.BrowseFilesFragment;
|
||||
import org.cryptomator.presentation.ui.fragment.ChooseCloudServiceFragment;
|
||||
import org.cryptomator.presentation.ui.fragment.CloudConnectionListFragment;
|
||||
import org.cryptomator.presentation.ui.fragment.CloudSettingsFragment;
|
||||
import org.cryptomator.presentation.ui.fragment.EmptyDirIdFileInfoFragment;
|
||||
import org.cryptomator.presentation.ui.fragment.ImagePreviewFragment;
|
||||
import org.cryptomator.presentation.ui.fragment.S3AddOrChangeFragment;
|
||||
import org.cryptomator.presentation.ui.fragment.SetPasswordFragment;
|
||||
@ -96,10 +94,6 @@ public interface ActivityComponent {
|
||||
|
||||
void inject(CloudConnectionListActivity cloudConnectionListActivity);
|
||||
|
||||
void inject(EmptyDirIdFileInfoActivity emptyDirIdFileInfoActivity);
|
||||
|
||||
void inject(EmptyDirIdFileInfoFragment emptyDirIdFileInfoFragment);
|
||||
|
||||
void inject(BiometricAuthSettingsActivity biometricAuthSettingsActivity);
|
||||
|
||||
void inject(BiometricAuthSettingsFragment biometricAuthSettingsFragment);
|
||||
|
@ -1,13 +0,0 @@
|
||||
package org.cryptomator.presentation.intent;
|
||||
|
||||
import org.cryptomator.generator.Intent;
|
||||
import org.cryptomator.presentation.ui.activity.EmptyDirIdFileInfoActivity;
|
||||
|
||||
@Intent(EmptyDirIdFileInfoActivity.class)
|
||||
public interface EmptyDirIdFileInfoIntent {
|
||||
|
||||
String dirName();
|
||||
|
||||
String dirFilePath();
|
||||
|
||||
}
|
@ -167,10 +167,7 @@ class BrowseFilesPresenter @Inject constructor( //
|
||||
return
|
||||
}
|
||||
e is EmptyDirFileException -> {
|
||||
Intents.emptyDirIdFileInfoIntent() //
|
||||
.withDirName(e.dirName) //
|
||||
.withDirFilePath(e.filePath) //
|
||||
.startActivity(this@BrowseFilesPresenter)
|
||||
view?.showNoDirFileDialog(e.dirName, e.filePath)
|
||||
}
|
||||
e is SymLinkException -> {
|
||||
view?.showSymLinkDialog()
|
||||
|
@ -1,18 +0,0 @@
|
||||
package org.cryptomator.presentation.presenter
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import org.cryptomator.domain.di.PerView
|
||||
import org.cryptomator.presentation.exception.ExceptionHandlers
|
||||
import org.cryptomator.presentation.ui.activity.view.EmptyDirFileView
|
||||
import javax.inject.Inject
|
||||
|
||||
@PerView
|
||||
class EmptyDirIdFileInfoPresenter @Inject constructor(exceptionMappings: ExceptionHandlers) : Presenter<EmptyDirFileView>(exceptionMappings) {
|
||||
|
||||
fun onShowMoreInfoButtonPressed() {
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
intent.data = Uri.parse("https://cryptomator.org/help/articles/sanitizer")
|
||||
context().startActivity(intent)
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package org.cryptomator.presentation.ui.activity
|
||||
|
||||
import org.cryptomator.generator.Activity
|
||||
import org.cryptomator.generator.InjectIntent
|
||||
import org.cryptomator.presentation.R
|
||||
import org.cryptomator.presentation.intent.EmptyDirIdFileInfoIntent
|
||||
import org.cryptomator.presentation.presenter.EmptyDirIdFileInfoPresenter
|
||||
import org.cryptomator.presentation.ui.activity.view.EmptyDirFileView
|
||||
import org.cryptomator.presentation.ui.fragment.EmptyDirIdFileInfoFragment
|
||||
import javax.inject.Inject
|
||||
import kotlinx.android.synthetic.main.toolbar_layout.toolbar
|
||||
|
||||
@Activity(layout = R.layout.activity_empty_dir_file_info)
|
||||
class EmptyDirIdFileInfoActivity : BaseActivity(), EmptyDirFileView {
|
||||
|
||||
@Inject
|
||||
lateinit var presenter: EmptyDirIdFileInfoPresenter
|
||||
|
||||
@InjectIntent
|
||||
lateinit var emptyDirIdFileInfoIntent: EmptyDirIdFileInfoIntent
|
||||
|
||||
override fun setupView() {
|
||||
setupToolbar()
|
||||
}
|
||||
|
||||
private fun setupToolbar() {
|
||||
toolbar.title = getString(
|
||||
R.string.screen_empty_dir_file_info_title,
|
||||
emptyDirIdFileInfoIntent.dirName()
|
||||
)
|
||||
setSupportActionBar(toolbar)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(supportFragmentManager.findFragmentByTag("EmptyDirIdFileInfoFragment") as EmptyDirIdFileInfoFragment)
|
||||
.setDirFilePath(emptyDirIdFileInfoIntent.dirFilePath())
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package org.cryptomator.presentation.ui.fragment
|
||||
|
||||
import org.cryptomator.generator.Fragment
|
||||
import org.cryptomator.presentation.R
|
||||
import org.cryptomator.presentation.presenter.EmptyDirIdFileInfoPresenter
|
||||
import javax.inject.Inject
|
||||
import kotlinx.android.synthetic.main.fragment_empty_dir_file_info.infoText
|
||||
import kotlinx.android.synthetic.main.fragment_empty_dir_file_info.moreDetailsButton
|
||||
|
||||
@Fragment(R.layout.fragment_empty_dir_file_info)
|
||||
class EmptyDirIdFileInfoFragment : BaseFragment() {
|
||||
|
||||
@Inject
|
||||
lateinit var presenter: EmptyDirIdFileInfoPresenter
|
||||
|
||||
override fun setupView() {
|
||||
moreDetailsButton.setOnClickListener { presenter.onShowMoreInfoButtonPressed() }
|
||||
}
|
||||
|
||||
fun setDirFilePath(dirFilePath: String) {
|
||||
infoText.text = String.format(getString(R.string.screen_empty_dir_file_info_text), dirFilePath)
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activityRootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/emptyDirIdFileInfoFragment"
|
||||
android:name="org.cryptomator.presentation.ui.fragment.EmptyDirIdFileInfoFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:tag="EmptyDirIdFileInfoFragment" />
|
||||
|
||||
</LinearLayout>
|
@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/screen_empty_dir_file_info_headline"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/infoText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="start"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/moreDetailsButton"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/screen_empty_dir_file_info_button_label"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
@ -292,12 +292,6 @@
|
||||
<string name="screen_authenticate_auth_authentication_failed">%1$s could not be authenticated.</string>
|
||||
<string name="screen_update_pcloud_connections_title">Update pCloud credentials</string>
|
||||
|
||||
<!-- ## screen: empty dir file info -->
|
||||
<string name="screen_empty_dir_file_info_title">\'%1$s\' unreachable</string>
|
||||
<string name="screen_empty_dir_file_info_headline">Cryptomator detected that this folder is unreachable.</string>
|
||||
<string name="screen_empty_dir_file_info_text">It may have been deleted by another application or a faulty cloud synchronization could have caused this.\n\nTry to restore the directory file via your cloud provider to a previous version which is not empty. The file in question is:\n%1$s\n\nIf that does not work, you may use Sanitizer to check your vault for issues and possibly restore your data.</string>
|
||||
<string name="screen_empty_dir_file_info_button_label">More Details on Sanitizer</string>
|
||||
|
||||
<!-- ## screen: insecure android version info -->
|
||||
|
||||
<!-- # dialogs -->
|
||||
@ -462,7 +456,7 @@
|
||||
<string name="dialog_sym_link_back_button">Back</string>
|
||||
|
||||
<string name="dialog_no_dir_file_title">Unable to load contents of directory</string>
|
||||
<string name="dialog_no_dir_file_message">Cloud folder \'%1$s\' doesn\'t have a directory file. It could be that the folder was created on another device and has not yet been fully synchronized to the cloud. Please check in your cloud if the following file exists:\n%2$s</string>
|
||||
<string name="dialog_no_dir_file_message">Cloud folder \'%1$s\' doesn\'t have a valid directory file. It could be that the folder was created on another device and has not yet been fully synchronized to the cloud. Please check in your cloud if the following file exists and is not empty:\n%2$s</string>
|
||||
<string name="dialog_no_dir_file_back_button" translatable="false">@string/dialog_sym_link_back_button</string>
|
||||
|
||||
<string name="dialog_beta_confirmation_title" translatable="false">Beta release</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user