mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Rename
This commit is contained in:
parent
808c401675
commit
c302148e89
@ -43,14 +43,14 @@ class SpanUtils @Inject constructor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Workaround for https://issuetracker.google.com/issues/188454876
|
// Workaround for https://issuetracker.google.com/issues/188454876
|
||||||
private fun canUseTextFuture(charSequence: Spanned): Boolean {
|
private fun canUseTextFuture(spanned: Spanned): Boolean {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
||||||
// On old devices, it works correctly
|
// On old devices, it works correctly
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return charSequence
|
return spanned
|
||||||
.getSpans(0, charSequence.length, Any::class.java)
|
.getSpans(0, spanned.length, Any::class.java)
|
||||||
.all { it !is StrikethroughSpan && it !is UnderlineSpan && it !is MetricAffectingSpan }
|
.all { it !is StrikethroughSpan && it !is UnderlineSpan && it !is MetricAffectingSpan }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user