diff --git a/app/src/main/java/com/simplemobiletools/filemanager/asynctasks/CopyTask.kt b/app/src/main/java/com/simplemobiletools/filemanager/asynctasks/CopyTask.kt index 22c1efd6..203e1740 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/asynctasks/CopyTask.kt +++ b/app/src/main/java/com/simplemobiletools/filemanager/asynctasks/CopyTask.kt @@ -5,7 +5,6 @@ import android.os.AsyncTask import android.support.v4.util.Pair import android.util.Log import com.simplemobiletools.filemanager.Config -import com.simplemobiletools.filemanager.fragments.ItemsFragment import com.simplemobiletools.filepicker.extensions.getFileDocument import com.simplemobiletools.filepicker.extensions.needsStupidWritePermissions import com.simplemobiletools.filepicker.extensions.scanFile @@ -134,14 +133,14 @@ class CopyTask(listener: CopyTask.CopyListener, val context: Context, val delete val listener = mListener?.get() ?: return if (success) { - listener.copySucceeded(if (deleteAfterCopy) ItemsFragment.ACTION_MOVE else ItemsFragment.ACTION_COPY) + listener.copySucceeded(deleteAfterCopy) } else { listener.copyFailed() } } interface CopyListener { - fun copySucceeded(action: Int) + fun copySucceeded(deleted: Boolean) fun copyFailed() } diff --git a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java index 282710d2..1f773d2f 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java @@ -68,9 +68,6 @@ public class ItemsFragment extends android.support.v4.app.Fragment private boolean mShowHidden; private int mSelectedItemsCnt; - public static int ACTION_COPY = 1; - public static int ACTION_MOVE = 2; - @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -485,14 +482,14 @@ public class ItemsFragment extends android.support.v4.app.Fragment } @Override - public void copySucceeded(int action) { + public void copySucceeded(boolean deleted) { fillItems(); - Utils.Companion.showToast(getContext(), action == ACTION_COPY ? R.string.copying_success : R.string.moving_success); + Utils.Companion.showToast(getContext(), deleted ? R.string.moving_success : R.string.copying_success); } @Override public void copyFailed() { - Utils.Companion.showToast(getContext(), R.string.copying_failed); + Utils.Companion.showToast(getContext(), R.string.copy_move_failed); } public interface ItemInteractionListener { diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 30baa0f6..03b0bbca 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -32,7 +32,7 @@ Source and destination cannot be the same Kopiere Files copied successfully - Konnte die Datei nicht kopieren + Konnte die Datei nicht kopieren Moving Files moved successfully A file with that name already exists diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index d05e1231..768d8bd6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -32,7 +32,7 @@ Source and destination cannot be the same Copia in corso Files copied successfully - Impossibile copiare i file + Impossibile copiare i file Moving Files moved successfully A file with that name already exists diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 25b86fcc..8b578585 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -32,7 +32,7 @@ Source and destination cannot be the same コピー中 Files copied successfully - ファイルをコピーできませんでした + ファイルをコピーできませんでした Moving Files moved successfully A file with that name already exists diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 9c9feaba..21e46efa 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -32,7 +32,7 @@ A origem e o destino não podem ser iguais A copiar Ficheiros copiados com sucesso - Não foi possível copiar os ficheiros + Não foi possível copiar os ficheiros A mover Ficheiros movidos com sucesso Já existe um ficheiro com este nome diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index f6bcc124..a3fc47b0 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -32,7 +32,7 @@ Source and destination cannot be the same Kopierar Files copied successfully - Kunde inte kopiera filen + Kunde inte kopiera filen Moving Files moved successfully A file with that name already exists diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9c18b1f1..0b2f14a9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -32,7 +32,7 @@ Source and destination cannot be the same Copying Files copied successfully - An error occurred + An error occurred Moving Files moved successfully A file with that name already exists