Fix mention selector getting stuck when quickly deleting the prompt (#2195)
* Fix mention selector getting stuck when quickly deleting the prompt
This commit is contained in:
committed by
GitHub
parent
3954612a72
commit
7008b403c0
1
changelog.d/2192.bugfix
Normal file
1
changelog.d/2192.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Mention selector gets stuck when quickly deleting the prompt.
|
||||
@@ -192,7 +192,7 @@ class MessageComposerPresenter @Inject constructor(
|
||||
// This will trigger a search immediately when `@` is typed
|
||||
val mentionStartTrigger = suggestionSearchTrigger.filter { it?.text.isNullOrEmpty() }
|
||||
// This will start a search when the user changes the text after the `@` with a debounce to prevent too much wasted work
|
||||
val mentionCompletionTrigger = suggestionSearchTrigger.filter { !it?.text.isNullOrEmpty() }.debounce(0.3.seconds)
|
||||
val mentionCompletionTrigger = suggestionSearchTrigger.debounce(0.3.seconds).filter { !it?.text.isNullOrEmpty() }
|
||||
merge(mentionStartTrigger, mentionCompletionTrigger)
|
||||
.combine(room.membersStateFlow) { suggestion, roomMembersState ->
|
||||
memberSuggestions.clear()
|
||||
|
||||
Reference in New Issue
Block a user