Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
0c911397
Commit
0c911397
authored
Oct 14, 2014
by
Geoffrey Métais
Browse files
Do not refresh videos list everytime
parent
3c3a37b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
View file @
0c911397
...
...
@@ -174,15 +174,19 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
@Override
public
void
onResume
()
{
super
.
onResume
();
//Get & set times
HashMap
<
String
,
Long
>
times
=
MediaDatabase
.
getInstance
().
getVideoTimes
(
getActivity
());
mVideoAdapter
.
setTimes
(
times
);
mVideoAdapter
.
notifyDataSetChanged
();
updateList
();
final
boolean
refresh
=
mVideoAdapter
.
isEmpty
();
if
(
refresh
){
updateList
();
//Get & set times
HashMap
<
String
,
Long
>
times
=
MediaDatabase
.
getInstance
().
getVideoTimes
(
getActivity
());
mVideoAdapter
.
setTimes
(
times
);
mVideoAdapter
.
notifyDataSetChanged
();
}
mMediaLibrary
.
addUpdateHandler
(
mHandler
);
mGridView
.
setSelection
(
mGVFirstVisiblePos
);
updateViewMode
();
mAnimator
.
animate
();
if
(
refresh
)
mAnimator
.
animate
();
/* Start the thumbnailer */
if
(
mThumbnailer
!=
null
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment