From d32fbb9c508fd24030461ad566b82653c59c7dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Mar=C3=ADn?= Date: Sat, 13 Apr 2024 22:47:56 +0200 Subject: [PATCH] refactor: use OnPush on all components --- src/app/app.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 21bb264..cc5b6be 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,4 +1,4 @@ - import { inject } from "@angular/core"; +import {ChangeDetectionStrategy, inject} from "@angular/core"; import {Component, OnInit} from '@angular/core'; import {DemoAdapter} from './adapters/demo-adapter'; import {ChatUser, ChatUserStatus} from '../../projects/ng-talk/src/lib/models/chat-user'; @@ -10,12 +10,14 @@ import {NgTalkChannelListComponent} from "../../projects/ng-talk/src/public_api" @Component({ selector: 'app-root', standalone: true, + changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, NgTalkChannelListComponent], templateUrl: './app.component.html', styleUrls: ['./app.component.less'] }) export class AppComponent implements OnInit { - public demoAdapter = inject(DemoAdapter); + public demoAdapter = inject(DemoAdapter); + public adapter: ChatAdapter; public chatSettings = new NgTalkSettings({ showAvatars: true,