Skip to content

Instantly share code, notes, and snippets.

@barron9
Created January 31, 2019 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barron9/fe99d265f07ba17e66c188ead6920784 to your computer and use it in GitHub Desktop.
Save barron9/fe99d265f07ba17e66c188ead6920784 to your computer and use it in GitHub Desktop.
pastetask
private class PasteTask extends AsyncTask<Void, Integer, Void> {
@Override
protected void onPreExecute() {
super.onPreExecute();
}
protected Void doInBackground(Void... voids) {
if (categoryName == null || categoryName.isEmpty() || new File(presenter.getCurrentPath()).exists()) {
presenter.pasteFiles(false, false);
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
if (categoryName == null || categoryName.isEmpty() || new File(presenter.getCurrentPath()).exists()) {
updateMod(ExplorerMode.NORMAL_MODE, -1);
} else {
makeSnackbar(getString(R.string.category_paste_error));
}
presenter.refresh();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment