From 87760b66d2171565c25916aef8d726ab5f9cd932 Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Sat, 26 Sep 2026 13:33:49 +0200 Subject: [PATCH] scroll down when changing filter --- dist/index.js | 19 ++++++++++++------- dist/sw.js | 2 +- dist/version.txt | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/dist/index.js b/dist/index.js index 333f5f19..9429d401 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3129,7 +3129,6 @@ }; this.updateMonthGrid = () => { const today = formatISO(this.coreViewModel.todayDate.value); - console.log(today, this.coreViewModel.todayDate.value); if (this.currentTodayDate == today) return; this.loadMonthTasks(); @@ -4188,7 +4187,7 @@ ); this.addMessage(chatMessage); this.connectionModel.sendMessageOrStore(chatMessage); - return true; + return chatMessage.id; }; this.decryptMessage = async (chatMessage) => { const decryptedBody = await decryptString( @@ -4607,19 +4606,24 @@ this.composingMessage = new State(""); this.focusSetter = new State(null); // methods - this.sendMessage = () => { + this.sendMessage = async () => { if (this.cannotSendMessage.value == true) return; - this.sendMessageFromBody(this.composingMessage.value); + const idPromise = this.sendMessageFromBody(this.composingMessage.value); this.composingMessage.value = ""; + const id = await idPromise; + if (id && this.reactionFilter.value != void 0) { + this.sendReaction(id, this.reactionFilter.value, false); + } }; this.sendMessageFromBody = (body) => { let replyId = void 0; if (this.replyingMessage.value) { replyId = this.replyingMessage.value.chatMessage.id; } - this.chatViewModel.chatModel.sendMessage(body, replyId); - if (this.replyViewSelectedMessage.value != void 0) return; - this.replyingMessage.value = void 0; + const id = this.chatViewModel.chatModel.sendMessage(body, replyId); + if (this.replyViewSelectedMessage.value == void 0) + this.replyingMessage.value = void 0; + return id; }; this.decryptMessage = async (messageViewModel) => { const chatMessage = messageViewModel.chatMessage; @@ -6751,6 +6755,7 @@ messagePageViewModel.filteredMessageViewModels.subscribeSilent( scrollDownIfApplicable ); + bulkSubscribe([messagePageViewModel.reactionFilter, messagePageViewModel.searchViewModel.appliedQuery], scrollDown); messagePageViewModel.replyViewSelectedMessage.subscribeSilent((selectedMessage) => { if (selectedMessage != void 0) return; setTimeout(scrollDown, 100); diff --git a/dist/sw.js b/dist/sw.js index 45a90d8c..292c0aba 100644 --- a/dist/sw.js +++ b/dist/sw.js @@ -1,4 +1,4 @@ -const VERSION = "2610 Beta 9" +const VERSION = "2610 Beta 10" function processUrl(event) { const url = event.request.url; diff --git a/dist/version.txt b/dist/version.txt index 78912be0..5368987d 100644 --- a/dist/version.txt +++ b/dist/version.txt @@ -1 +1 @@ -2610 Beta 9 +2610 Beta 10.8