From 773e633867e856d1bff6873b88902adbc37af576 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 20 May 2021 16:41:11 +0200 Subject: [PATCH] Makse sure busyspimmer are only running when required --- imports/NeoChat/Component/ChatBox/TypingPane.qml | 1 + imports/NeoChat/Page/RoomPage.qml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/imports/NeoChat/Component/ChatBox/TypingPane.qml b/imports/NeoChat/Component/ChatBox/TypingPane.qml index 4294715a0..9beb705f3 100644 --- a/imports/NeoChat/Component/ChatBox/TypingPane.qml +++ b/imports/NeoChat/Component/ChatBox/TypingPane.qml @@ -38,6 +38,7 @@ Loader { text: typingNotification } BusyIndicator { + running: root.active Layout.alignment: Qt.AlignRight Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium diff --git a/imports/NeoChat/Page/RoomPage.qml b/imports/NeoChat/Page/RoomPage.qml index da308e3ab..67f412f74 100644 --- a/imports/NeoChat/Page/RoomPage.qml +++ b/imports/NeoChat/Page/RoomPage.qml @@ -98,8 +98,9 @@ Kirigami.ScrollablePage { id: loadingIndicator anchors.centerIn: parent visible: page.currentRoom === null || (messageListView.count === 0 && !page.currentRoom.allHistoryLoaded && !page.currentRoom.isInvite) + text: i18n("Loading") QQC2.BusyIndicator { - running: true + running: loadingIndicator.visible } } @@ -342,6 +343,7 @@ Kirigami.ScrollablePage { } NumberAnimation { property: "opacity"; to: 1 + duration: Kirigami.Units.shortDuration } } @@ -353,6 +355,7 @@ Kirigami.ScrollablePage { } NumberAnimation { property: "opacity"; to: 1 + duration: Kirigami.Units.shortDuration } } @@ -744,7 +747,7 @@ Kirigami.ScrollablePage { Connections { enabled: Config.showFancyEffects target: messageEventModel - onFancyEffectsReasonFound: { + function onFancyEffectsReasonFound(fancyEffect) { fancyEffectsContainer.processFancyEffectsReason(fancyEffect) } } @@ -752,7 +755,7 @@ Kirigami.ScrollablePage { Connections { enabled: Config.showFancyEffects target: chatBox - onFancyEffectsReasonFound: { + function onFancyEffectsReasonFound(fancyEffect) { fancyEffectsContainer.processFancyEffectsReason(fancyEffect) } }