Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
47ca6c76
Commit
47ca6c76
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Image loading: Use Activity scope if available
parent
055078a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#8694
passed with stage
in 4 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
+4
-1
4 additions, 1 deletion
vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
with
4 additions
and
1 deletion
vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
+
4
−
1
View file @
47ca6c76
...
...
@@ -78,7 +78,10 @@ fun loadImage(v: View, item: MediaLibraryItem?, imageWidth: Int = 0) {
}
val
bitmap
=
if
(
cacheKey
!==
null
)
BitmapCache
.
getBitmapFromMemCache
(
cacheKey
)
else
null
if
(
bitmap
!==
null
)
updateImageView
(
bitmap
,
v
,
binding
)
else
AppScope
.
launch
{
getImage
(
v
,
findInLibrary
(
item
,
isMedia
,
isGroup
),
binding
,
imageWidth
)
}
else
{
val
scope
=
(
v
.
context
as
?
CoroutineScope
)
?:
AppScope
scope
.
launch
{
getImage
(
v
,
findInLibrary
(
item
,
isMedia
,
isGroup
),
binding
,
imageWidth
)
}
}
}
fun
loadPlaylistImageWithWidth
(
v
:
ImageView
,
item
:
MediaLibraryItem
?,
imageWidth
:
Int
)
{
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
62a3faf8
·
5 years ago
mentioned in commit
62a3faf8
mentioned in commit 62a3faf8daa2038821ddb5891d3d18fbd7e7cc79
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment