Add new conversation button
This commit is contained in:
@@ -116,6 +116,7 @@ export class UI {
|
||||
);
|
||||
this.$conversationsClose = document.getElementById('conversations-close');
|
||||
this.$conversationsSearch = document.getElementById('conversation-search');
|
||||
this.$conversationNew = document.getElementById('conversation-new');
|
||||
this.$conversationsList = document.getElementById('conversation-list');
|
||||
this.$tplConversationItem = document.getElementById(
|
||||
'tpl-conversation-item',
|
||||
@@ -1166,6 +1167,9 @@ export class UI {
|
||||
this.$conversationsSearch.addEventListener('input', () =>
|
||||
this.handlers.onConversationSearch(this.$conversationsSearch.value),
|
||||
);
|
||||
this.$conversationNew.addEventListener('click', () =>
|
||||
this.handlers.onNewConversation(),
|
||||
);
|
||||
this.$conversationsList.addEventListener('click', (event) => {
|
||||
const $item = event.target.closest('[data-conversation-id]');
|
||||
if (!$item) return;
|
||||
|
||||
Reference in New Issue
Block a user