[Android] Do not create handler just for clearing purpose

Geoffrey Métais git at videolan.org
Thu Feb 13 14:44:14 CET 2020


vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 13 14:43:38 2020 +0100| [1cdecb6001e97f2acce6cf00a04d9303aea76821] | committer: Geoffrey Métais

Do not create handler just for clearing purpose

> https://code.videolan.org/videolan/vlc-android/commit/1cdecb6001e97f2acce6cf00a04d9303aea76821
---

 vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
index 307a44417..f51d28445 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
@@ -114,7 +114,7 @@ open class BaseBrowserAdapter(protected val fragment: BaseBrowserFragment) : Dif
     }
 
     override fun onDetachedFromRecyclerView(recyclerView: RecyclerView) {
-        handler.removeCallbacksAndMessages(null)
+        if (Settings.listTitleEllipsize == 0 || Settings.listTitleEllipsize == 4) handler.removeCallbacksAndMessages(null)
         super.onDetachedFromRecyclerView(recyclerView)
     }
 



More information about the Android mailing list