mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
Merge pull request #2752 from nextcloud/bugfix/2729/fixThumbnailsInFileBrowser
Fix to show thumbnails in FileBrowser
This commit is contained in:
commit
01128b7b93
4 changed files with 6 additions and 7 deletions
|
@ -137,7 +137,7 @@ fun ImageView.loadThumbnail(url: String, user: User): io.reactivex.disposables.D
|
|||
}
|
||||
|
||||
if (url.startsWith(user.baseUrl!!) &&
|
||||
(url.contains("index.php/core/preview?fileId=") || url.contains("/avatar/"))
|
||||
(url.contains("index.php/core/preview") || url.contains("/avatar/"))
|
||||
) {
|
||||
requestBuilder.addHeader(
|
||||
"Authorization",
|
||||
|
@ -163,7 +163,7 @@ fun ImageView.loadImage(url: String, user: User, placeholder: Drawable? = null):
|
|||
.transformations(RoundedCornersTransformation(ROUNDING_PIXEL, ROUNDING_PIXEL, ROUNDING_PIXEL, ROUNDING_PIXEL))
|
||||
|
||||
if (url.startsWith(user.baseUrl!!) &&
|
||||
(url.contains("index.php/core/preview?fileId=") || url.contains("/avatar/"))
|
||||
(url.contains("index.php/core/preview") || url.contains("/avatar/"))
|
||||
) {
|
||||
requestBuilder.addHeader(
|
||||
"Authorization",
|
||||
|
|
|
@ -147,7 +147,6 @@ class RemoteFileBrowserActivity : AppCompatActivity(), SelectionInterface, Swipe
|
|||
|
||||
viewModel.selectedPaths.observe(this) { selectedPaths ->
|
||||
filesSelectionDoneMenuItem?.isVisible = !selectedPaths.isNullOrEmpty()
|
||||
binding.recyclerView.adapter?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,13 +96,13 @@ class RemoteFileBrowserItemsListViewHolder(
|
|||
val path = ApiUtils.getUrlForFilePreviewWithRemotePath(
|
||||
currentUser.baseUrl,
|
||||
item.path,
|
||||
binding.fileIcon.context.resources.getDimensionPixelSize(R.dimen.small_item_height)
|
||||
fileIcon.context.resources.getDimensionPixelSize(R.dimen.small_item_height)
|
||||
)
|
||||
if (path.isNotEmpty()) {
|
||||
binding.fileIcon.loadImage(path, currentUser, placeholder)
|
||||
fileIcon.loadImage(path, currentUser, placeholder)
|
||||
}
|
||||
} else {
|
||||
binding.fileIcon.setImageDrawable(placeholder)
|
||||
fileIcon.setImageDrawable(placeholder)
|
||||
}
|
||||
|
||||
binding.filenameTextView.text = item.displayName
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DO NOT TOUCH; GENERATED BY DRONE
|
||||
<span class="mdl-layout-title">Lint Report: 111 warnings</span>
|
||||
<span class="mdl-layout-title">Lint Report: 110 warnings</span>
|
||||
|
|
Loading…
Reference in a new issue