Added back album name to Notification

This commit is contained in:
Prathamesh More 2022-03-15 23:07:11 +05:30
parent 371d137c51
commit edd1903c6c

View file

@ -125,8 +125,14 @@ class PlayingNotificationImpl24(
} }
override fun updateMetadata(song: Song, onUpdate: () -> Unit) { override fun updateMetadata(song: Song, onUpdate: () -> Unit) {
setContentTitle(song.title) setContentTitle(
setContentText( HtmlCompat.fromHtml(
"<b>" + song.title + "</b>",
HtmlCompat.FROM_HTML_MODE_LEGACY
)
)
setContentText(song.artistName)
setSubText(
HtmlCompat.fromHtml( HtmlCompat.fromHtml(
"<b>" + song.albumName + "</b>", "<b>" + song.albumName + "</b>",
HtmlCompat.FROM_HTML_MODE_LEGACY HtmlCompat.FROM_HTML_MODE_LEGACY
@ -169,10 +175,12 @@ class PlayingNotificationImpl24(
} }
override fun onLoadCleared(placeholder: Drawable?) { override fun onLoadCleared(placeholder: Drawable?) {
setLargeIcon(BitmapFactory.decodeResource( setLargeIcon(
BitmapFactory.decodeResource(
context.resources, context.resources,
R.drawable.default_audio_art R.drawable.default_audio_art
)) )
)
onUpdate() onUpdate()
} }
}) })