improve focus setting in messages

This commit is contained in:
marlon-erler
2026-09-23 15:30:21 +02:00
parent c49c50124f
commit 9c45fbc426
3 changed files with 9 additions and 5 deletions
+6 -3
View File
@@ -74,13 +74,16 @@ export default class MessagePageViewModel extends Context {
setReply = (
chatMessageViewModel: ChatMessageViewModel | undefined,
setFocus: boolean = true,
): void => {
this.replyingMessage.value = chatMessageViewModel;
if (setFocus == false || chatMessageViewModel == undefined) return;
this.setFocus();
};
resetReply = (): void => {
resetReply = (setFocus: boolean = true): void => {
this.replyingMessage.value = undefined;
if (setFocus == false) return;
this.setFocus();
};
@@ -138,12 +141,12 @@ export default class MessagePageViewModel extends Context {
setReplyView = (message: ChatMessageViewModel): void => {
this.replyViewSelectedMessage.value = message;
this.revokeReactionFilter();
this.setReply(message);
this.setReply(message, false);
}
resetReplyView = (): void => {
this.replyViewSelectedMessage.value = undefined;
this.resetReply();
this.resetReply(false);
}
setFocus = (): void => {