1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-543 Editor | Don't clear text watchers (#2658)

Co-authored-by: konstantiniiv <ki@anytype.io>
This commit is contained in:
Konstantin Ivanov 2022-10-15 11:58:25 +02:00 committed by GitHub
parent 3d4e49642c
commit 8c364b0979
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 7 deletions

View file

@ -55,7 +55,6 @@ interface TextHolder {
}
fun enableReadMode() {
content.clearTextWatchers()
content.enableReadMode()
//content.selectionWatcher = null
}

View file

@ -99,7 +99,6 @@ class Description(val binding: ItemBlockDescriptionBinding) : BlockViewHolder(bi
fun enableReadMode() {
binding.tvBlockDescription.enableReadMode()
binding.tvBlockDescription.selectionWatcher = null
binding.tvBlockDescription.clearTextWatchers()
}
fun enableEditMode() {

View file

@ -149,11 +149,6 @@ class TextInputWidget : AppCompatEditText {
super.removeTextChangedListener(watcher)
}
fun clearTextWatchers() {
watchers.forEach { super.removeTextChangedListener(it) }
watchers.clear()
}
fun dismissMentionWatchers() {
watchers.filterIsInstance(MentionTextWatcher::class.java).forEach { it.onDismiss() }
}