diff --git a/app/src/main/java/com/quran/labs/androidquran/ui/translation/TranslationAdapter.kt b/app/src/main/java/com/quran/labs/androidquran/ui/translation/TranslationAdapter.kt index 030f6fe4f5..9dfb0ccb97 100644 --- a/app/src/main/java/com/quran/labs/androidquran/ui/translation/TranslationAdapter.kt +++ b/app/src/main/java/com/quran/labs/androidquran/ui/translation/TranslationAdapter.kt @@ -423,21 +423,13 @@ internal class TranslationAdapter( } private fun updateHighlight(row: TranslationViewRow, holder: RowViewHolder) { - // toggle highlighting of the ayah, but not for sura headers and basmallah + // toggle highlighting of the ayah number and Quran text only val isHighlighted = row.ayahInfo.ayahId == highlightedAyah - if (row.type != TranslationViewRow.Type.SURA_HEADER && - row.type != TranslationViewRow.Type.BASMALLAH && - row.type != TranslationViewRow.Type.SPACER - ) { + if (row.type == TranslationViewRow.Type.VERSE_NUMBER || + row.type == TranslationViewRow.Type.QURAN_TEXT) { holder.wrapperView.setBackgroundColor( if (isHighlighted) ayahSelectionColor else 0 ) - } else if (holder.divider != null) { // SPACER type - if (isHighlighted) { - holder.divider.highlight(ayahSelectionColor) - } else { - holder.divider.unhighlight() - } } }