perf(chatScroll): Fix connection warnings

This commit is contained in:
Alex Jbanca 2023-01-10 13:43:30 +02:00 committed by Alex Jbanca
parent eb60d90346
commit 4e3e245675
2 changed files with 9 additions and 9 deletions

View File

@ -293,12 +293,12 @@ Rectangle {
enabled: control.emojiPopupOpened enabled: control.emojiPopupOpened
target: emojiPopup target: emojiPopup
onEmojiSelected: function (text, atCursor) { function onEmojiSelected(text, atCursor) {
insertInTextInput(atCursor ? messageInputField.cursorPosition : messageInputField.length, text) insertInTextInput(atCursor ? messageInputField.cursorPosition : messageInputField.length, text)
emojiBtn.highlighted = false emojiBtn.highlighted = false
messageInputField.forceActiveFocus(); messageInputField.forceActiveFocus();
} }
onClosed: { function onClosed() {
emojiBtn.highlighted = false emojiBtn.highlighted = false
control.emojiPopupOpened = false control.emojiPopupOpened = false
} }
@ -308,12 +308,12 @@ Rectangle {
enabled: control.stickersPopupOpened enabled: control.stickersPopupOpened
target: control.stickersPopup target: control.stickersPopup
onStickerSelected: { function onStickerSelected(hashId, packId, url) {
control.stickerSelected(hashId, packId, url) control.stickerSelected(hashId, packId, url)
control.hideExtendedArea(); control.hideExtendedArea();
messageInputField.forceActiveFocus(); messageInputField.forceActiveFocus();
} }
onClosed: { function onClosed() {
stickersBtn.highlighted = false stickersBtn.highlighted = false
control.stickersPopupOpened = false control.stickersPopupOpened = false
} }
@ -908,7 +908,7 @@ Rectangle {
enabled: control.isActiveChannel enabled: control.isActiveChannel
target: Global.dragArea target: Global.dragArea
ignoreUnknownSignals: true ignoreUnknownSignals: true
onDroppedOnValidScreen: (drop) => { function onDroppedOnValidScreen(drop) {
let validImages = validateImages(drop.urls) let validImages = validateImages(drop.urls)
if (validImages.length > 0) { if (validImages.length > 0) {
showImageArea(validImages) showImageArea(validImages)

View File

@ -51,16 +51,16 @@ Column {
Connections { Connections {
target: localAccountSensitiveSettings target: localAccountSensitiveSettings
onWhitelistedUnfurlingSitesChanged: { function onWhitelistedUnfurlingSitesChanged() {
fetched = false fetched = false
linkMessageLoader.sourceComponent = undefined linkMessageLoader.sourceComponent = undefined
linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent() linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent()
} }
onNeverAskAboutUnfurlingAgainChanged: { function onNeverAskAboutUnfurlingAgainChanged() {
linkMessageLoader.sourceComponent = undefined linkMessageLoader.sourceComponent = undefined
linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent() linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent()
} }
onDisplayChatImagesChanged: { function onDisplayChatImagesChanged() {
linkMessageLoader.sourceComponent = undefined linkMessageLoader.sourceComponent = undefined
linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent() linkMessageLoader.sourceComponent = linkMessageLoader.getSourceComponent()
} }
@ -106,7 +106,7 @@ Column {
id: linkCommunityFetchConnections id: linkCommunityFetchConnections
enabled: false enabled: false
target: root.store.communitiesModuleInst target: root.store.communitiesModuleInst
onCommunityAdded: { function onCommunityAdded(communityId) {
if (communityId !== linkData.communityId) { if (communityId !== linkData.communityId) {
return return
} }