Merge pull request #12231 from nextcloud/handle-sync-cancel

Fix: Cancel Sync does not work
This commit is contained in:
Alper Öztürk 2023-12-05 08:58:48 +01:00 committed by GitHub
commit 548f770968
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -412,6 +412,8 @@ public class PreviewImageFragment extends FileFragment implements Injectable {
seeDetails(); seeDetails();
} else if (itemId == R.id.action_download_file || itemId == R.id.action_sync_file) { } else if (itemId == R.id.action_download_file || itemId == R.id.action_sync_file) {
containerActivity.getFileOperationsHelper().syncFile(getFile()); 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) { } else if (itemId == R.id.action_set_as_wallpaper) {
containerActivity.getFileOperationsHelper().setPictureAs(getFile(), getImageView()); containerActivity.getFileOperationsHelper().setPictureAs(getFile(), getImageView());
} else if (itemId == R.id.action_export_file) { } else if (itemId == R.id.action_export_file) {

View file

@ -450,6 +450,8 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
seeDetails(); seeDetails();
} else if (itemId == R.id.action_sync_file) { } else if (itemId == R.id.action_sync_file) {
containerActivity.getFileOperationsHelper().syncFile(getFile()); containerActivity.getFileOperationsHelper().syncFile(getFile());
} else if (itemId == R.id.action_cancel_sync) {
containerActivity.getFileOperationsHelper().cancelTransference(getFile());
} else if (itemId == R.id.action_stream_media) { } else if (itemId == R.id.action_stream_media) {
containerActivity.getFileOperationsHelper().streamMediaFile(getFile()); containerActivity.getFileOperationsHelper().streamMediaFile(getFile());
} else if (itemId == R.id.action_export_file) { } else if (itemId == R.id.action_export_file) {

View file

@ -330,6 +330,8 @@ public class PreviewTextFileFragment extends PreviewTextFragment {
seeDetails(); seeDetails();
} else if (itemId == R.id.action_sync_file) { } else if (itemId == R.id.action_sync_file) {
containerActivity.getFileOperationsHelper().syncFile(getFile()); containerActivity.getFileOperationsHelper().syncFile(getFile());
} else if(itemId == R.id.action_cancel_sync){
containerActivity.getFileOperationsHelper().cancelTransference(getFile());
} else if (itemId == R.id.action_edit) { } else if (itemId == R.id.action_edit) {
containerActivity.getFileOperationsHelper().openFileWithTextEditor(getFile(), getContext()); containerActivity.getFileOperationsHelper().openFileWithTextEditor(getFile(), getContext());
} }