Skip to content

Commit

Permalink
Revert "chore: fix unit test"
Browse files Browse the repository at this point in the history
This reverts commit f952d6a.
  • Loading branch information
szuperaz committed Sep 3, 2024
1 parent 3787a3b commit 5a8ae44
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export class AutocompleteTextareaComponent
private transliterationService: TransliterationService,
private emojiInputService: EmojiInputService,
private customTemplatesService: CustomTemplatesService,
private themeService: ThemeService,
private cdRef: ChangeDetectorRef
) {
this.searchTerm$.pipe(debounceTime(300)).subscribe((searchTerm) => {
Expand Down Expand Up @@ -199,7 +200,7 @@ export class AutocompleteTextareaComponent
}
if (changes.value && !this.value && this.messageInput) {
this.messageInput.nativeElement.style.height = 'auto';
this.chatClientService?.chatClient?.logger?.(
this.chatClientService.chatClient.logger(
'info',
'[Autocomplete textarea] Value reset, adjusting textarea height to auto'
);
Expand All @@ -210,7 +211,7 @@ export class AutocompleteTextareaComponent
this.messageInput &&
this.isViewInited
) {
this.chatClientService?.chatClient?.logger?.(
this.chatClientService.chatClient.logger(
'info',
'[Autocomplete textarea] Value changed'
);
Expand All @@ -224,7 +225,7 @@ export class AutocompleteTextareaComponent

ngAfterViewInit(): void {
this.isViewInited = true;
this.chatClientService?.chatClient?.logger?.(
this.chatClientService.chatClient.logger(
'info',
'[Autocomplete textarea] View inited'
);
Expand Down Expand Up @@ -262,7 +263,7 @@ export class AutocompleteTextareaComponent

inputChanged() {
this.valueChange.emit(this.messageInput.nativeElement.value);
this.chatClientService?.chatClient?.logger?.(
this.chatClientService.chatClient.logger(
'info',
'[Autocomplete textarea] Input changed'
);
Expand All @@ -284,12 +285,12 @@ export class AutocompleteTextareaComponent
private adjustTextareaHeight() {
const necessaryHeight = `${this.messageInput.nativeElement.scrollHeight}px`;
if (this.messageInput.nativeElement.style.height === necessaryHeight) {
this.chatClientService?.chatClient?.logger?.(
this.chatClientService.chatClient.logger(
'info',
`[Autocomplete textarea] No need to adjust textarea height`
);
} else {
this.chatClientService?.chatClient?.logger?.(
this.chatClientService.chatClient.logger(
'info',
`[Autocomplete textarea] Adjusting textarea height to ${necessaryHeight}`
);
Expand Down

0 comments on commit 5a8ae44

Please sign in to comment.