clear only background spans of some views, not all

This commit is contained in:
tibbi 2020-03-29 16:43:16 +02:00
parent deb583c647
commit d4d5dc37b4
2 changed files with 3 additions and 3 deletions
app
build.gradle
src/main/kotlin/com/simplemobiletools/notes/pro/activities

@ -57,7 +57,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.24.2'
implementation 'com.simplemobiletools:commons:5.24.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
kapt 'androidx.room:room-compiler:2.2.5'

@ -334,7 +334,7 @@ class MainActivity : SimpleActivity() {
view_pager.onPageChangeListener {
currentTextFragment?.removeTextWatcher()
currentNotesView()?.let { noteView ->
noteView.text.clearSpans()
noteView.text.clearBackgroundSpans()
}
closeSearch()
@ -354,7 +354,7 @@ class MainActivity : SimpleActivity() {
private fun searchTextChanged(text: String) {
currentNotesView()?.let { noteView ->
currentTextFragment?.removeTextWatcher()
noteView.text.clearSpans()
noteView.text.clearBackgroundSpans()
if (text.isNotBlank() && text.length > 1) {
searchMatches = noteView.value.searchMatches(text)