diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt index 7495ce12c46..bbd1ad02c02 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt @@ -137,10 +137,10 @@ class PreviewImageActivity : FileActivity(), 0, file.remotePath.lastIndexOf(file.fileName) ) - var parentFolder = storageManager.getFileByPath(parentPath) + var parentFolder = storageManager.getFileByPath(parentPath, file.spaceId) if (parentFolder == null) { // should not be necessary - parentFolder = storageManager.getFileByPath(OCFile.ROOT_PATH) + parentFolder = storageManager.getFileByPath(OCFile.ROOT_PATH, file.spaceId) } val sharedPreferencesProvider: SharedPreferencesProvider by inject() diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt index 1bd5318a86b..31e7b7cc894 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt @@ -160,7 +160,7 @@ class PreviewImagePagerAdapter( // trigger the creation of new PreviewImageFragment to replace current FileDownloadFragment // only if the download succeeded. If not trigger an error notifyDataSetChanged() - } else fragment?.onSyncEvent(action, success, null) + } else fragment?.onSyncEvent(action, success, file) } } }