Skip to content

Commit bf8db0d

Browse files
authored
fix: emitting onEndMention event - android (#317)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect --> # Summary Fixes: #312 ## Test Plan - Start a `@` mention and click an option in your UI that calls `setMention` - Notice that `onEndMention` is called after setting mention ## Screenshots / Videos n/a ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ❌ | | Android | ✅ |
1 parent d70a75f commit bf8db0d

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

android/src/main/java/com/swmansion/enriched/events/MentionHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class MentionHandler(private val view: EnrichedTextInputView) {
99
private var previousIndicator: String? = null
1010

1111
fun reset() {
12+
endMention()
1213
previousText = null
13-
previousIndicator = null
1414
}
1515

1616
fun endMention() {

example/src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,13 @@ export default function App() {
262262
id: item.id,
263263
type: 'user',
264264
});
265-
closeUserMentionPopup();
266265
};
267266

268267
const handleChannelMentionSelected = (item: MentionItem) => {
269268
ref.current?.setMention('#', `#${item.name}`, {
270269
id: item.id,
271270
type: 'channel',
272271
});
273-
closeChannelMentionPopup();
274272
};
275273

276274
const handleFocusEvent = () => {

0 commit comments

Comments
 (0)