[Android] Video fragment: Avoid useless refresh
Geoffrey Métais
git at videolan.org
Mon Feb 19 14:47:35 CET 2018
vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 19 09:48:33 2018 +0100| [664cbb6ad9b86db641e576c0536a1f8c0a0878e5] | committer: Geoffrey Métais
Video fragment: Avoid useless refresh
(cherry picked from commit 4ef3217793ea38d96b465028bc512c1660a76193)
> https://code.videolan.org/videolan/vlc-android/commit/664cbb6ad9b86db641e576c0536a1f8c0a0878e5
---
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index ae6a077be..4da309119 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -402,7 +402,7 @@ public class VideoGridFragment extends SortableFragment<VideoListAdapter> implem
protected void onParsingServiceFinished() {
mMediaLibrary.removeMediaUpdatedCb();
mMediaLibrary.removeMediaAddedCb();
- mHandler.sendEmptyMessage(UPDATE_LIST);
+ if (!isHidden()) mHandler.sendEmptyMessage(UPDATE_LIST);
}
@Override
@@ -417,8 +417,7 @@ public class VideoGridFragment extends SortableFragment<VideoListAdapter> implem
@Override
public void restoreList() {
- if (mAdapter != null && mGridView != null)
- mAdapter.restoreList();
+ if (mAdapter != null && mGridView != null) mAdapter.restoreList();
}
@Override
More information about the Android
mailing list