[Android] Videos: add loading display
Geoffrey Métais
git at videolan.org
Thu Jul 18 16:06:59 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jul 18 15:23:38 2019 +0200| [00a6a266809a26316951f13234603baa2ffef7c5] | committer: Geoffrey Métais
Videos: add loading display
> https://code.videolan.org/videolan/vlc-android/commit/00a6a266809a26316951f13234603baa2ffef7c5
---
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
index 2055794f2..6e8022bf7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
@@ -107,6 +107,10 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
else arguments?.getParcelable(KEY_FOLDER)
viewModel = getViewModel(folder)
viewModel.provider.pagedList.observe(this, this)
+ viewModel.provider.loading.observe(this, Observer { loading ->
+ if (loading) handler.sendEmptyMessageDelayed(SET_REFRESHING, 300L)
+ else handler.sendEmptyMessage(UNSET_REFRESHING)
+ })
AbstractMedialibrary.lastThumb.observe(this, thumbObs)
}
}
More information about the Android
mailing list