implement contacts model and vm with chat model

This commit is contained in:
marlon-erler
2026-09-27 02:41:49 +02:00
parent 66a88ac1b1
commit c5d61a5790
5 changed files with 31 additions and 28 deletions
+5 -1
View File
@@ -13,7 +13,10 @@ export default class ContactListViewModel {
}
const vm = new ContactViewModel(id, name);
this.contacts.set(id, vm);
this.contactListModel.storeContact(id, name);
}
handleContact = (contact: [string, string]): void => {
this.updateContact(...contact);
}
// load
@@ -28,6 +31,7 @@ export default class ContactListViewModel {
// init
constructor(public contactListModel: ContactListModel) {
this.loadData();
this.contactListModel.contactHandlerManager.setHandler("contact-list-view-model", this.handleContact);
}
}