[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:14 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Apr  8 09:33:34 2020 +0200| [35fc682978c2a99c27a031c9dab6bddea22b5801] | 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/35fc682978c2a99c27a031c9dab6bddea22b5801
---

 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 7b7d03691..fe47b2116 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
@@ -351,7 +351,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, IAudioPlay
     }
 
     fun onNextClick(view: View) {
-        if (!playlistModel.next()) UiTools.snacker(requireActivity().findViewById(android.R.id.content), R.string.lastsong)
+        if (!playlistModel.next()) activity?.window?.decorView?.let { UiTools.snacker(it, R.string.lastsong) }
     }
 
     fun onPreviousClick(view: View) {



More information about the Android mailing list