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-28 18:22:42 +0300
commit7c44ce071e0fe3e062ebe8dfc98ddeb8ccc88185 (patch)
treef461da5dea98f27254c43d7c4d901b3616a6dd71
parentb3c63bfaefb8a14c2a5845d3949fa13b575398d4 (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);
}