Skip to content
Snippets Groups Projects
Commit af4538bb authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Audioplayer: mitigate ANR in playlist

parent 81004dac
Branches master
No related tags found
No related merge requests found
......@@ -56,6 +56,7 @@ import com.google.android.material.snackbar.Snackbar
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.actor
import org.videolan.libvlc.util.AndroidUtil
import org.videolan.medialibrary.Tools
import org.videolan.medialibrary.interfaces.media.AbstractMediaWrapper
import org.videolan.tools.isStarted
......@@ -140,6 +141,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, CoroutineS
binding.audioMediaSwitcher.setAudioMediaSwitcherListener(headerMediaSwitcherListener)
binding.coverMediaSwitcher.setAudioMediaSwitcherListener(mCoverMediaSwitcherListener)
binding.playlistSearchText.editText?.addTextChangedListener(this)
if (!AndroidUtil.isLolliPopOrLater) binding.songsList.itemAnimator = null
val callback = SwipeDragItemTouchHelperCallback(playlistAdapter, true)
val touchHelper = ItemTouchHelper(callback)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment