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