Skip to content

Commit

Permalink
Merge pull request #524 from GetStream/fix-mention-delete
Browse files Browse the repository at this point in the history
fix: Deleting and reentering the same char after @ doesn't update the…
  • Loading branch information
szuperaz authored Jan 8, 2024
2 parents 4bb53f2 + bd6fdce commit 30525cf
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { UserResponse } from 'stream-chat';
import { ChannelService } from '../../channel.service';
import { TextareaInterface } from '../textarea.interface';
import { ChatClientService } from '../../chat-client.service';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import { debounceTime } from 'rxjs/operators';
import { TransliterationService } from '../../transliteration.service';
import { EmojiInputService } from '../emoji-input.service';
import { CustomTemplatesService } from '../../custom-templates.service';
Expand Down Expand Up @@ -128,13 +128,11 @@ export class AutocompleteTextareaComponent
private customTemplatesService: CustomTemplatesService,
private themeService: ThemeService
) {
this.searchTerm$
.pipe(debounceTime(300), distinctUntilChanged())
.subscribe((searchTerm) => {
if (searchTerm.startsWith(this.mentionTriggerChar)) {
void this.updateMentionOptions(searchTerm);
}
});
this.searchTerm$.pipe(debounceTime(300)).subscribe((searchTerm) => {
if (searchTerm.startsWith(this.mentionTriggerChar)) {
void this.updateMentionOptions(searchTerm);
}
});
this.subscriptions.push(
this.channelService.activeChannel$.subscribe((channel) => {
const commands = channel?.getConfig()?.commands || [];
Expand Down

0 comments on commit 30525cf

Please sign in to comment.