Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jsxc/jsxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2021-12-28 18:18:04 +0300
committersualko <klaus@jsxc.org>2021-12-29 17:49:47 +0300
commit03972d849153bac30509f660d7773a0956593bf8 (patch)
treef6f13499fbfcbcb7921acad9e3b85e51f806e746
parentafa23f048d1f38f75b2706cfbb83e191c519da43 (diff)
fix(mam): load button after history was cleared
-rw-r--r--src/plugins/mam/Plugin.ts2
-rw-r--r--src/ui/ChatWindow.ts2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/mam/Plugin.ts b/src/plugins/mam/Plugin.ts
index f1ecf072..187ad36d 100644
--- a/src/plugins/mam/Plugin.ts
+++ b/src/plugins/mam/Plugin.ts
@@ -64,8 +64,6 @@ export default class MessageArchiveManagementPlugin extends AbstractPlugin {
if (this.supportCache[archiveJid.bare]) {
this.getArchive(contact.getJid()).clear();
}
-
- this.addLoadButtonIfEnabled(chatWindow, contact);
});
this.pluginAPI.getConnection().registerHandler(this.onMamMessage, null, 'message', null);
diff --git a/src/ui/ChatWindow.ts b/src/ui/ChatWindow.ts
index a86763ce..ce03e97e 100644
--- a/src/ui/ChatWindow.ts
+++ b/src/ui/ChatWindow.ts
@@ -162,7 +162,7 @@ export default class ChatWindow {
this.getTranscript().clear();
- this.element.find('.jsxc-message-area').empty();
+ this.element.find('.jsxc-message-area').empty().trigger('scroll');
this.getAccount().triggerChatWindowClearedHook(this, this.contact);
}