diff --git a/projects/stream-chat-angular/src/lib/custom-templates.service.ts b/projects/stream-chat-angular/src/lib/custom-templates.service.ts index 1cc46001..f0bfc639 100644 --- a/projects/stream-chat-angular/src/lib/custom-templates.service.ts +++ b/projects/stream-chat-angular/src/lib/custom-templates.service.ts @@ -292,9 +292,9 @@ export class CustomTemplatesService { newMessagesIndicatorTemplate$ = new BehaviorSubject< TemplateRef | undefined >(undefined); - emptyChannelPlaceholder$ = new BehaviorSubject | undefined>( - undefined - ); + emptyChannelPlaceholder$ = new BehaviorSubject< + TemplateRef<{ mode: 'main' | 'thread' }> | undefined + >(undefined); constructor() {} } diff --git a/projects/stream-chat-angular/src/lib/message-list/message-list.component.html b/projects/stream-chat-angular/src/lib/message-list/message-list.component.html index 2c0f740c..fc256d8d 100644 --- a/projects/stream-chat-angular/src/lib/message-list/message-list.component.html +++ b/projects/stream-chat-angular/src/lib/message-list/message-list.component.html @@ -35,7 +35,12 @@ " > - + diff --git a/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts b/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts index 5735d84b..a3bec173 100644 --- a/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts +++ b/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts @@ -87,7 +87,9 @@ export class MessageListComponent messageTemplate: TemplateRef | undefined; customDateSeparatorTemplate: TemplateRef | undefined; customnewMessagesIndicatorTemplate: TemplateRef | undefined; - emptyChannelPlaceholderTemplate: TemplateRef | undefined; + emptyChannelPlaceholderTemplate: TemplateRef<{ + mode: 'main' | 'thread'; + }> | null = null; messages$!: Observable; enabledMessageActions: string[] = []; @HostBinding('class') private class = @@ -222,7 +224,7 @@ export class MessageListComponent ); this.subscriptions.push( this.customTemplatesService.emptyChannelPlaceholder$.subscribe( - (template) => (this.emptyChannelPlaceholderTemplate = template) + (template) => (this.emptyChannelPlaceholderTemplate = template || null) ) ); this.usersTypingInChannel$ = this.channelService.usersTypingInChannel$;