adding event after loading more messages in chat
| @@ -443,6 +443,7 @@ export const event_types = { | |||
| 443 | MESSAGE_DELETED: 'message_deleted', | 443 | MESSAGE_DELETED: 'message_deleted', |
| 444 | MESSAGE_UPDATED: 'message_updated', | 444 | MESSAGE_UPDATED: 'message_updated', |
| 445 | MESSAGE_FILE_EMBEDDED: 'message_file_embedded', | 445 | MESSAGE_FILE_EMBEDDED: 'message_file_embedded', |
| 446 | MORE_MESSAGES_LOADED: 'more_messages_loaded', | ||
| 446 | IMPERSONATE_READY: 'impersonate_ready', | 447 | IMPERSONATE_READY: 'impersonate_ready', |
| 447 | CHAT_CHANGED: 'chat_id_changed', | 448 | CHAT_CHANGED: 'chat_id_changed', |
| 448 | GENERATION_AFTER_COMMANDS: 'GENERATION_AFTER_COMMANDS', | 449 | GENERATION_AFTER_COMMANDS: 'GENERATION_AFTER_COMMANDS', |
| @@ -1859,6 +1860,8 @@ export function showMoreMessages(messagesToLoad = null) { | |||
| 1859 | const newHeight = $('#chat').prop('scrollHeight'); | 1860 | const newHeight = $('#chat').prop('scrollHeight'); |
| 1860 | $('#chat').scrollTop(newHeight - prevHeight); | 1861 | $('#chat').scrollTop(newHeight - prevHeight); |
| 1861 | } | 1862 | } |
| 1863 | |||
| 1864 | eventSource.emit(event_types.MORE_MESSAGES_LOADED) | ||
| 1862 | } | 1865 | } |
| 1863 | 1866 | ||
| 1864 | export async function printMessages() { | 1867 | export async function printMessages() { |