From 4e3e245675191ce5877f1417ae826396d5680e63 Mon Sep 17 00:00:00 2001 From: Alex Jbanca Date: Tue, 10 Jan 2023 13:43:30 +0200 Subject: [PATCH] perf(chatScroll): Fix connection warnings --- ui/imports/shared/status/StatusChatInput.qml | 10 +++++----- ui/imports/shared/views/chat/LinksMessageView.qml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index e94a403b7b8..299f24c360f 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -293,12 +293,12 @@ Rectangle { enabled: control.emojiPopupOpened target: emojiPopup - onEmojiSelected: function (text, atCursor) { + function onEmojiSelected(text, atCursor) { insertInTextInput(atCursor ? messageInputField.cursorPosition : messageInputField.length, text) emojiBtn.highlighted = false messageInputField.forceActiveFocus(); } - onClosed: { + function onClosed() { emojiBtn.highlighted = false control.emojiPopupOpened = false } @@ -308,12 +308,12 @@ Rectangle { enabled: control.stickersPopupOpened target: control.stickersPopup - onStickerSelected: { + function onStickerSelected(hashId, packId, url) { control.stickerSelected(hashId, packId, url) control.hideExtendedArea(); messageInputField.forceActiveFocus(); } - onClosed: { + function onClosed() { stickersBtn.highlighted = false control.stickersPopupOpened = false } @@ -908,7 +908,7 @@ Rectangle { enabled: control.isActiveChannel target: Global.dragArea ignoreUnknownSignals: true - onDroppedOnValidScreen: (drop) => { + function onDroppedOnValidScreen(drop) { let validImages = validateImages(drop.urls) if (validImages.length > 0) { showImageArea(validImages) diff --git a/ui/imports/shared/views/chat/LinksMessageView.qml b/ui/imports/shared/views/chat/LinksMessageView.qml index 52548c829e2..6fcf1770afc 100644 --- a/ui/imports/shared/views/chat/LinksMessageView.qml +++ b/ui/imports/shared/views/chat/LinksMessageView.qml @@ -51,16 +51,16 @@ Column { Connections { target: localAccountSensitiveSettings - onWhitelistedUnfurlingSitesChanged: { + function onWhitelistedUnfurlingSitesChanged() { fetched = false linkMessageLoader.sourceComponent = undefined linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent() } - onNeverAskAboutUnfurlingAgainChanged: { + function onNeverAskAboutUnfurlingAgainChanged() { linkMessageLoader.sourceComponent = undefined linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent() } - onDisplayChatImagesChanged: { + function onDisplayChatImagesChanged() { linkMessageLoader.sourceComponent = undefined linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent() } @@ -106,7 +106,7 @@ Column { id: linkCommunityFetchConnections enabled: false target: root.store.communitiesModuleInst - onCommunityAdded: { + function onCommunityAdded(communityId) { if (communityId !== linkData.communityId) { return }