Minor code improvement

This commit is contained in:
Naveen 2023-08-20 22:53:47 +05:30
parent 191dc56da0
commit 05495a58f6
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3

View file

@ -9,9 +9,7 @@ import androidx.media3.common.*
import androidx.media3.common.util.UnstableApi
import androidx.media3.session.*
import com.simplemobiletools.commons.extensions.hasPermission
import com.simplemobiletools.musicplayer.extensions.config
import com.simplemobiletools.musicplayer.extensions.isReallyPlaying
import com.simplemobiletools.musicplayer.extensions.nextMediaItem
import com.simplemobiletools.musicplayer.extensions.*
import com.simplemobiletools.musicplayer.helpers.NotificationHelper
import com.simplemobiletools.musicplayer.helpers.getPermissionToRequest
import com.simplemobiletools.musicplayer.playback.library.MediaItemProvider
@ -72,9 +70,7 @@ class PlaybackService : MediaLibraryService() {
}
internal fun withPlayer(callback: Player.() -> Unit) {
Handler(player.applicationLooper).post {
callback(player)
}
player.applicationLooper.post { callback(player) }
}
private fun showNoPermissionNotification() {