[Android] Add delay on loading and remove useless icons

Nicolas Pomepuy git at videolan.org
Thu Apr 16 15:43:51 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Apr 16 13:58:11 2020 +0200| [4ea966ec3cd8f37f9eb8db40e7ee7d7ded92142c] | committer: Nicolas Pomepuy

Add delay on loading and remove useless icons

> https://code.videolan.org/videolan/vlc-android/commit/4ea966ec3cd8f37f9eb8db40e7ee7d7ded92142c
---

 .../vlc-android/res/drawable-hdpi/ic_clear_orange.png    | Bin 282 -> 0 bytes
 .../vlc-android/res/drawable-hdpi/ic_queue_music.png     | Bin 345 -> 0 bytes
 .../vlc-android/res/drawable-mdpi/ic_clear_orange.png    | Bin 213 -> 0 bytes
 .../vlc-android/res/drawable-mdpi/ic_queue_music.png     | Bin 245 -> 0 bytes
 .../vlc-android/res/drawable-xhdpi/ic_clear_orange.png   | Bin 335 -> 0 bytes
 .../vlc-android/res/drawable-xhdpi/ic_queue_music.png    | Bin 463 -> 0 bytes
 .../vlc-android/res/drawable-xxhdpi/ic_clear_orange.png  | Bin 464 -> 0 bytes
 .../vlc-android/res/drawable-xxhdpi/ic_queue_music.png   | Bin 725 -> 0 bytes
 .../vlc-android/res/drawable-xxxhdpi/ic_clear_orange.png | Bin 603 -> 0 bytes
 .../vlc-android/res/drawable-xxxhdpi/ic_queue_music.png  | Bin 1008 -> 0 bytes
 .../vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt |  15 +++++++++++----
 11 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/application/vlc-android/res/drawable-hdpi/ic_clear_orange.png b/application/vlc-android/res/drawable-hdpi/ic_clear_orange.png
deleted file mode 100644
index 185740585..000000000
Binary files a/application/vlc-android/res/drawable-hdpi/ic_clear_orange.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-hdpi/ic_queue_music.png b/application/vlc-android/res/drawable-hdpi/ic_queue_music.png
deleted file mode 100644
index 34f35e389..000000000
Binary files a/application/vlc-android/res/drawable-hdpi/ic_queue_music.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-mdpi/ic_clear_orange.png b/application/vlc-android/res/drawable-mdpi/ic_clear_orange.png
deleted file mode 100644
index 50026d475..000000000
Binary files a/application/vlc-android/res/drawable-mdpi/ic_clear_orange.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-mdpi/ic_queue_music.png b/application/vlc-android/res/drawable-mdpi/ic_queue_music.png
deleted file mode 100644
index f1a4f00db..000000000
Binary files a/application/vlc-android/res/drawable-mdpi/ic_queue_music.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-xhdpi/ic_clear_orange.png b/application/vlc-android/res/drawable-xhdpi/ic_clear_orange.png
deleted file mode 100644
index 63f5a57d9..000000000
Binary files a/application/vlc-android/res/drawable-xhdpi/ic_clear_orange.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-xhdpi/ic_queue_music.png b/application/vlc-android/res/drawable-xhdpi/ic_queue_music.png
deleted file mode 100644
index d78d95c74..000000000
Binary files a/application/vlc-android/res/drawable-xhdpi/ic_queue_music.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-xxhdpi/ic_clear_orange.png b/application/vlc-android/res/drawable-xxhdpi/ic_clear_orange.png
deleted file mode 100644
index cce214a4e..000000000
Binary files a/application/vlc-android/res/drawable-xxhdpi/ic_clear_orange.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-xxhdpi/ic_queue_music.png b/application/vlc-android/res/drawable-xxhdpi/ic_queue_music.png
deleted file mode 100644
index 21cf252bb..000000000
Binary files a/application/vlc-android/res/drawable-xxhdpi/ic_queue_music.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-xxxhdpi/ic_clear_orange.png b/application/vlc-android/res/drawable-xxxhdpi/ic_clear_orange.png
deleted file mode 100644
index bb5695f80..000000000
Binary files a/application/vlc-android/res/drawable-xxxhdpi/ic_clear_orange.png and /dev/null differ
diff --git a/application/vlc-android/res/drawable-xxxhdpi/ic_queue_music.png b/application/vlc-android/res/drawable-xxxhdpi/ic_queue_music.png
deleted file mode 100644
index 6a7086ec5..000000000
Binary files a/application/vlc-android/res/drawable-xxxhdpi/ic_queue_music.png and /dev/null differ
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
index fc821f068..555c8f314 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/MoreFragment.kt
@@ -37,6 +37,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
 import kotlinx.android.synthetic.main.more_fragment.*
 import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.ObsoleteCoroutinesApi
+import kotlinx.coroutines.delay
 import kotlinx.coroutines.flow.onEach
 import org.videolan.medialibrary.interfaces.Medialibrary
 import org.videolan.medialibrary.interfaces.media.MediaWrapper
@@ -105,8 +106,11 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, SwipeRefreshLayout.
             restoreMultiSelectHelper()
         })
         viewModel.loading.observe(viewLifecycleOwner) {
-            (activity as? MainActivity)?.refreshing = it
-            if (it) historyEntry.loading.state = EmptyLoadingState.LOADING
+            lifecycleScope.launchWhenStarted {
+                if (it) delay(300L)
+                (activity as? MainActivity)?.refreshing = it
+                if (it) historyEntry.loading.state = EmptyLoadingState.LOADING
+            }
         }
         historyAdapter.updateEvt.observe(viewLifecycleOwner) {
             swipeRefreshLayout.isRefreshing = false
@@ -131,8 +135,11 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, SwipeRefreshLayout.
 
         })
         streamsViewModel.loading.observe(requireActivity(), Observer {
-            (activity as? MainActivity)?.refreshing = it
-            if (it) streamsEntry.loading.state = EmptyLoadingState.LOADING
+            lifecycleScope.launchWhenStarted {
+                if (it) delay(300L)
+                (activity as? MainActivity)?.refreshing = it
+                if (it) streamsEntry.loading.state = EmptyLoadingState.LOADING
+            }
         })
 
         settingsButton.setOnClickListener {



More information about the Android mailing list