= new EventEmitter();
- @Input() chat!: ChatModel;
+ @Input() chat!: ChatModel | any;
@Input() event!: NostrEventDocument;
constructor(private service: ChatService) {}
diff --git a/src/app/shared/chat-list/chat-list.component.ts b/src/app/shared/chat-list/chat-list.component.ts
index 3d3124f..9c4dc83 100644
--- a/src/app/shared/chat-list/chat-list.component.ts
+++ b/src/app/shared/chat-list/chat-list.component.ts
@@ -18,8 +18,7 @@ export class ChatListComponent implements OnInit {
constructor(public chatService: ChatService) {}
ngOnInit() {
- this.chatService.download();
-
+ // this.chatService.download();
// this.chatService.uniqueChats$.subscribe((data) => {
// console.log('YEEH!', data);
// });
diff --git a/src/app/shared/message-list/message-list.component.html b/src/app/shared/message-list/message-list.component.html
new file mode 100644
index 0000000..dc9188b
--- /dev/null
+++ b/src/app/shared/message-list/message-list.component.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+ search
+
+
+
+
+
+
+
+
+
+
+
+{{ chat.pubkey }} : {{ chat.content }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/shared/message-list/message-list.component.scss b/src/app/shared/message-list/message-list.component.scss
new file mode 100644
index 0000000..42faf70
--- /dev/null
+++ b/src/app/shared/message-list/message-list.component.scss
@@ -0,0 +1,15 @@
+.form {
+ padding: 16px 16px 0 16px;
+}
+
+.input-full-width {
+ position: relative;
+ margin: auto;
+}
+
+.search {
+ position: sticky;
+ top: 0;
+ padding: 10px;
+ z-index: 999;
+}
diff --git a/src/app/shared/message-list/message-list.component.spec.ts b/src/app/shared/message-list/message-list.component.spec.ts
new file mode 100644
index 0000000..5f7894e
--- /dev/null
+++ b/src/app/shared/message-list/message-list.component.spec.ts
@@ -0,0 +1,25 @@
+// import {async, ComponentFixture, TestBed} from '@angular/core/testing';
+
+// import {ChatListComponent} from './chat-list.component';
+
+// describe('ChatListComponent', () => {
+// let component: ChatListComponent;
+// let fixture: ComponentFixture;
+
+// beforeEach(async(() => {
+// TestBed.configureTestingModule({
+// declarations: [ChatListComponent]
+// })
+// .compileComponents();
+// }));
+
+// beforeEach(() => {
+// fixture = TestBed.createComponent(ChatListComponent);
+// component = fixture.componentInstance;
+// fixture.detectChanges();
+// });
+
+// it('should create', () => {
+// expect(component).toBeTruthy();
+// });
+// });
diff --git a/src/app/shared/message-list/message-list.component.ts b/src/app/shared/message-list/message-list.component.ts
new file mode 100644
index 0000000..ebfad26
--- /dev/null
+++ b/src/app/shared/message-list/message-list.component.ts
@@ -0,0 +1,35 @@
+import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
+import { from, Observable, of } from 'rxjs';
+import { ChatService } from 'src/app/services/chat.service';
+
+interface ChatModel {
+ id: string;
+ name: string;
+}
+
+@Component({
+ selector: 'app-message-list',
+ templateUrl: './message-list.component.html',
+ styleUrls: ['./message-list.component.scss'],
+})
+export class MessageListComponent implements OnInit {
+ @Output() openChatSidebar: EventEmitter = new EventEmitter();
+
+ constructor(public chatService: ChatService) {}
+
+ ngOnInit() {
+ this.chatService.download();
+
+ // this.chatService.uniqueChats$.subscribe((data) => {
+ // console.log('YEEH!', data);
+ // });
+ }
+
+ add() {
+ // this.#chats.unshift({ id: '123', name: 'Yes!' });
+ }
+
+ reset() {
+ // this.#chats = [];
+ }
+}