File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
app/src/main/java/com/nextcloud/utils/extensions Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -37,25 +37,12 @@ fun List<OCFile>.hasSameContentAs(other: List<OCFile>): Boolean {
3737
3838fun List<OCFile>.filterFilenames (): List <OCFile > = distinctBy { it.fileName }
3939
40- fun List<OCFile>.filterTempFilter (): List <OCFile > = filterNot { it.isTempFile() }
41-
4240fun OCFile.isTempFile (): Boolean {
4341 val context = MainApp .getAppContext()
4442 val appTempPath = FileStorageUtils .getAppTempDirectoryPath(context)
4543 return storagePath?.startsWith(appTempPath) == true
4644}
4745
48- fun List<OCFile>.filterHiddenFiles (): List <OCFile > = filterNot { it.isHidden }.distinct()
49-
50- fun List<OCFile>.filterByMimeType (mimeType : String ): List <OCFile > =
51- filter { it.isFolder || it.mimeType.startsWith(mimeType) }
52-
53- fun List<OCFile>.limitToPersonalFiles (userId : String ): List <OCFile > = filter { file ->
54- file.ownerId?.let { ownerId ->
55- ownerId == userId && ! file.isSharedWithMe && ! file.mounted()
56- } == true
57- }
58-
5946fun OCFile.mediaSize (defaultThumbnailSize : Float ): Pair <Int , Int > {
6047 val width = (imageDimension?.width?.toInt() ? : defaultThumbnailSize.toInt())
6148 val height = (imageDimension?.height?.toInt() ? : defaultThumbnailSize.toInt())
You can’t perform that action at this time.
0 commit comments