diff --git a/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java index 2ad81abafd..7ebc62326a 100755 --- a/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java @@ -347,17 +347,6 @@ public class UploadListActivity extends FileActivity { } } - /** - * Switches to FileDisplayActivity and shows file (eg. image preview). - */ - public void openFile(String remotePath) { - Intent intent = new Intent(this, FileDisplayActivity.class); - intent.setAction(Intent.ACTION_VIEW); - intent.putExtra(FileDisplayActivity.KEY_FILE_PATH, remotePath); - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); - startActivity(intent); - } - /** * Once the file upload has changed its status -> update uploads list view */ diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java index 4ebc8c2ccb..821d44ac3c 100755 --- a/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java @@ -62,7 +62,8 @@ import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.operations.RefreshFolderOperation; import com.owncloud.android.ui.activity.ConflictsResolveActivity; import com.owncloud.android.ui.activity.FileActivity; -import com.owncloud.android.ui.activity.UploadListActivity; +import com.owncloud.android.ui.activity.FileDisplayActivity; +import com.owncloud.android.ui.preview.PreviewImageFragment; import com.owncloud.android.utils.DisplayUtils; import com.owncloud.android.utils.MimeTypeUtil; import com.owncloud.android.utils.theme.ViewThemeUtils; @@ -760,9 +761,24 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter