mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed media list fragment when VFS is enabled, the first time it was opened it wasn't possible to scroll to other files
This commit is contained in:
parent
64a2c5f455
commit
354f39d76d
1 changed files with 7 additions and 2 deletions
|
|
@ -90,10 +90,13 @@ class MediaListViewModel
|
|||
Log.d(
|
||||
"$TAG [VFS] Content is encrypted, requesting plain file path for file [${mediaContent.filePath}]"
|
||||
)
|
||||
mediaContent.exportPlainFile()
|
||||
val exportedPath = mediaContent.exportPlainFile()
|
||||
Log.i("$TAG Media original path is [$originalPath], newly exported plain file path is [$exportedPath]")
|
||||
exportedPath
|
||||
} else {
|
||||
originalPath
|
||||
}
|
||||
|
||||
val name = mediaContent.name.orEmpty()
|
||||
val size = mediaContent.size.toLong()
|
||||
val timestamp = mediaContent.creationTimestamp
|
||||
|
|
@ -103,10 +106,12 @@ class MediaListViewModel
|
|||
|
||||
val model = FileModel(path, name, size, timestamp, isEncrypted, originalPath, ephemeral)
|
||||
list.add(model)
|
||||
} else {
|
||||
Log.w("$TAG Skipping content because either name [$name] or path [$path] is empty")
|
||||
}
|
||||
|
||||
if (tempFilePath.isNotEmpty() && !tempFileModelFound) {
|
||||
if (path == tempFilePath) {
|
||||
if (path == tempFilePath || (isEncrypted && originalPath == temporaryModel.originalPath)) {
|
||||
tempFileModelFound = true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue