mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 13:15:35 +03:00
Add doc for buildOCFilesFromShares
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
9a32ddb508
commit
60aa0a0b99
1 changed files with 5 additions and 3 deletions
|
@ -16,11 +16,13 @@ object OCShareToOCFileConverter {
|
|||
private const val MILLIS_PER_SECOND = 1000
|
||||
|
||||
/**
|
||||
* Generates a list of incomplete [OCFile] from a list of [OCShare]
|
||||
* Generates a list of incomplete [OCFile] from a list of [OCShare]. Retrieving OCFile directly by path may fail in cases like
|
||||
* when a shared file is located at a/b/c/d/a.txt. To display a.txt in the shared tab, the device needs the OCFile.
|
||||
* On first launch, the app may not be aware of the file until the exact path is accessed.
|
||||
*
|
||||
* This is actually pretty complex as we get one [OCShare] item for each shared instance for the same folder
|
||||
* Server implementation needed to get file size, thumbnails e.g. : <a href="https://github.com/nextcloud/server/issues/4456g</a>.
|
||||
*
|
||||
* **THIS ONLY WORKS WITH FILES SHARED *BY* THE USER, NOT FOR SHARES *WITH* THE USER**
|
||||
* Note: This works only for files shared *by* the user, not files shared *with* the user.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun buildOCFilesFromShares(shares: List<OCShare>): List<OCFile> {
|
||||
|
|
Loading…
Reference in a new issue