[Android] Apply suggestion to application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt

Nicolas Pomepuy git at videolan.org
Thu Apr 9 09:16:15 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Apr  8 09:33:37 2020 +0200| [fee89db9ca3b6bbd5a6ca3ea6667d1c27b0b7399] | committer: Geoffrey Métais

Apply suggestion to application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index fe47b2116..be6a29e2a 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -355,7 +355,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, IAudioPlay
     }
 
     fun onPreviousClick(view: View) {
-        if (!playlistModel.previous()) UiTools.snacker(requireActivity().findViewById(android.R.id.content), R.string.firstsong)
+        if (!playlistModel.previous()) activity?.window?.decorView?.let { UiTools.snacker(it,  R.string.firstsong) }
     }
 
     fun onRepeatClick(view: View) {



More information about the Android mailing list