mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
allow copying and moving only photo and video files with the gallery
This commit is contained in:
parent
cf67f52ea2
commit
7c3ad32dee
4 changed files with 6 additions and 6 deletions
|
@ -52,7 +52,7 @@ import butterknife.ButterKnife;
|
|||
public class MainActivity extends SimpleActivity
|
||||
implements AdapterView.OnItemClickListener, GridView.MultiChoiceModeListener, GridView.OnTouchListener,
|
||||
SwipeRefreshLayout.OnRefreshListener, ChangeSorting.ChangeDialogListener, GetDirectoriesAsynctask.GetDirectoriesListener,
|
||||
CopyMoveTask.CopyListener {
|
||||
CopyMoveTask.CopyMoveListener {
|
||||
@BindView(R.id.directories_grid) GridView mGridView;
|
||||
@BindView(R.id.directories_holder) SwipeRefreshLayout mSwipeRefreshLayout;
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ import butterknife.ButterKnife;
|
|||
|
||||
public class MediaActivity extends SimpleActivity
|
||||
implements AdapterView.OnItemClickListener, GridView.MultiChoiceModeListener, GridView.OnTouchListener,
|
||||
SwipeRefreshLayout.OnRefreshListener, ChangeSorting.ChangeDialogListener, CopyMoveTask.CopyListener {
|
||||
SwipeRefreshLayout.OnRefreshListener, ChangeSorting.ChangeDialogListener, CopyMoveTask.CopyMoveListener {
|
||||
private static final String TAG = MediaActivity.class.getSimpleName();
|
||||
@BindView(R.id.media_grid) GridView mGridView;
|
||||
@BindView(R.id.media_holder) SwipeRefreshLayout mSwipeRefreshLayout;
|
||||
|
|
|
@ -43,7 +43,7 @@ import butterknife.OnClick;
|
|||
|
||||
public class ViewPagerActivity extends SimpleActivity
|
||||
implements ViewPager.OnPageChangeListener, View.OnSystemUiVisibilityChangeListener, ViewPager.OnTouchListener,
|
||||
ViewPagerFragment.FragmentClickListener, CopyMoveTask.CopyListener {
|
||||
ViewPagerFragment.FragmentClickListener, CopyMoveTask.CopyMoveListener {
|
||||
@BindView(R.id.undo_delete) View mUndoBtn;
|
||||
@BindView(R.id.view_pager) MyViewPager mPager;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import kotlinx.android.synthetic.main.dialog_copy_move.view.*
|
|||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val copyMoveListener: CopyMoveTask.CopyListener) {
|
||||
class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val copyMoveListener: CopyMoveTask.CopyMoveListener) {
|
||||
|
||||
init {
|
||||
val context = activity
|
||||
|
@ -76,13 +76,13 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val c
|
|||
if (view.dialog_radio_group.checkedRadioButtonId == R.id.dialog_radio_copy) {
|
||||
context.toast(R.string.copying)
|
||||
val pair = Pair<ArrayList<File>, File>(files, destinationDir)
|
||||
CopyMoveTask(context, false, config.treeUri, copyMoveListener).execute(pair)
|
||||
CopyMoveTask(context, false, config.treeUri, true, copyMoveListener).execute(pair)
|
||||
dismiss()
|
||||
} else {
|
||||
if (context.isPathOnSD(sourcePath) || context.isPathOnSD(destinationPath)) {
|
||||
context.toast(R.string.moving)
|
||||
val pair = Pair<ArrayList<File>, File>(files, destinationDir)
|
||||
CopyMoveTask(context, true, config.treeUri, copyMoveListener).execute(pair)
|
||||
CopyMoveTask(context, true, config.treeUri, true, copyMoveListener).execute(pair)
|
||||
dismiss()
|
||||
} else {
|
||||
val updatedFiles = ArrayList<File>(files.size * 2)
|
||||
|
|
Loading…
Reference in a new issue