Skip to content

Commit 81556bb

Browse files
Merge pull request #52 from essmigel/kotlin
fix CalledFromWrongThreadException in searhActivity
2 parents 401f7e0 + 89ebfb4 commit 81556bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/rxjava2/android/samples/ui/search/SearchActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class SearchActivity : AppCompatActivity() {
3838
.debounce(300, TimeUnit.MILLISECONDS)
3939
.filter { text ->
4040
if (text.isEmpty()) {
41-
textViewResult.text = ""
41+
runOnUiThread { textViewResult.text = "" }
4242
return@filter false
4343
} else {
4444
return@filter true

0 commit comments

Comments
 (0)