diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java index b0ec4ee1b4..82aa0da0eb 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java @@ -412,6 +412,8 @@ public class PreviewImageFragment extends FileFragment implements Injectable { seeDetails(); } else if (itemId == R.id.action_download_file || itemId == R.id.action_sync_file) { containerActivity.getFileOperationsHelper().syncFile(getFile()); + }else if(itemId == R.id.action_cancel_sync){ + containerActivity.getFileOperationsHelper().cancelTransference(getFile()); } else if (itemId == R.id.action_set_as_wallpaper) { containerActivity.getFileOperationsHelper().setPictureAs(getFile(), getImageView()); } else if (itemId == R.id.action_export_file) { diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java index 7975f46b6a..53bd85a8ed 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java @@ -450,6 +450,8 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene seeDetails(); } else if (itemId == R.id.action_sync_file) { containerActivity.getFileOperationsHelper().syncFile(getFile()); + } else if (itemId == R.id.action_cancel_sync) { + containerActivity.getFileOperationsHelper().cancelTransference(getFile()); } else if (itemId == R.id.action_stream_media) { containerActivity.getFileOperationsHelper().streamMediaFile(getFile()); } else if (itemId == R.id.action_export_file) { diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewTextFileFragment.java b/app/src/main/java/com/owncloud/android/ui/preview/PreviewTextFileFragment.java index 16648c631c..da91d02b96 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewTextFileFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewTextFileFragment.java @@ -330,6 +330,8 @@ public class PreviewTextFileFragment extends PreviewTextFragment { seeDetails(); } else if (itemId == R.id.action_sync_file) { containerActivity.getFileOperationsHelper().syncFile(getFile()); + } else if(itemId == R.id.action_cancel_sync){ + containerActivity.getFileOperationsHelper().cancelTransference(getFile()); } else if (itemId == R.id.action_edit) { containerActivity.getFileOperationsHelper().openFileWithTextEditor(getFile(), getContext()); }