Skip to content

Commit

Permalink
Fix gallery mode on spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
abelgardep committed Feb 9, 2023
1 parent ecf0e6e commit d8ed3a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

0 comments on commit d8ed3a4

Please sign in to comment.