Merge pull request #12686 from JosJuice/android-remove-strikeout

Android: Unset STRIKE_THRU_TEXT_FLAG for editable settings
This commit is contained in:
Admiral H. Curtiss 2024-04-20 23:34:05 +02:00 committed by GitHub
commit a46ffc5d08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,8 +28,13 @@ abstract class SettingViewHolder(itemView: View, protected val adapter: Settings
val overridden = settingsItem.isOverridden
textView.setTypeface(null, if (overridden) Typeface.BOLD else Typeface.NORMAL)
if (!settingsItem.isEditable) textView.paintFlags =
textView.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
if (settingsItem.isEditable) {
textView.paintFlags =
textView.paintFlags and Paint.STRIKE_THRU_TEXT_FLAG.inv()
} else {
textView.paintFlags =
textView.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
}
}
/**