chat info: review optimizations

This commit is contained in:
John Gibbon 2020-11-17 10:09:06 +01:00
parent 78cc3fbac4
commit 813c7912fe
7 changed files with 11 additions and 12 deletions

View file

@ -28,7 +28,6 @@ SilicaFlickable {
property alias membersList: membersList
function initializePage() {
console.log("[ChatInformationPage] Initializing chat info page...");
membersList.clear();
var chatType = chatInformation.type["@type"];
switch(chatType) {
@ -294,7 +293,7 @@ SilicaFlickable {
id: contentFlickable
contentHeight: groupInfoItem.height + tabViewLoader.height
clip: true
interactive: true//groupInfoItem.height > pageContent.height * 0.5
interactive: !scrollUpAnimation.running && !scrollDownAnimation.running
anchors {
top: headerItem.bottom
@ -435,7 +434,7 @@ SilicaFlickable {
horizontalAlignment: Qt.AlignHCenter
opacity: (tabViewLoader.status === Loader.Ready && tabViewLoader.item.count > 0) ? 1.0 : 0.0
Behavior on opacity { PropertyAnimation {duration: 500}}
Behavior on opacity { FadeAnimation {}}
}
}

View file

@ -25,7 +25,7 @@ Item {
visible: imageContainer.tweenFactor > 0.8 && chatPictureDetail.imageStatus === Image.Ready
property bool isActive: imageContainer.tweenFactor === 1.0
opacity: isActive ? 1.0 : 0.0
Behavior on opacity { NumberAnimation {} }
Behavior on opacity { FadeAnimation {} }
ProfileThumbnail {
id: chatPictureDetail
anchors.fill: parent

View file

@ -25,7 +25,7 @@ Item {
property bool isActive: imageContainer.tweenFactor === 1.0
opacity: isActive ? 1.0 : 0.0
Behavior on opacity { NumberAnimation {} }
Behavior on opacity { FadeAnimation {} }
SlideshowView {
id: bigProfilePictureList

View file

@ -35,8 +35,8 @@ Item {
default property alias _data: contentItem.data
opacity: active ? 1.0 : 0.2
Behavior on opacity { PropertyAnimation {duration: 300}}
opacity: active ? 1.0 : 0.0
Behavior on opacity { FadeAnimation {}}
Column {
id: loadingColumn
@ -47,7 +47,7 @@ Item {
topPadding: Theme.paddingLarge
anchors.top: parent.top
opacity: loadingVisible ? 1.0 : 0.0
Behavior on opacity { NumberAnimation {} }
Behavior on opacity { FadeAnimation {} }
visible: tabItem.loading
InfoLabel {

View file

@ -40,7 +40,7 @@ ChatInformationTabItemBase {
height: tabBase.height
width: tabBase.width
opacity: tabBase.loading ? (count > 0 ? 0.5 : 0.0) : 1.0
Behavior on opacity { NumberAnimation {} }
Behavior on opacity { FadeAnimation {} }
function handleScrollIntoView(force){
if(!tabBase.loading && !dragging && !quickScrollAnimating ) {
if(!atYBeginning) {

View file

@ -61,8 +61,8 @@ Item {
width: loaded ? (headerGrid.width / tabView.count) : 0
opacity: loaded ? 1.0 : 0.0
Behavior on width { PropertyAnimation {duration: 300}}
Behavior on opacity { PropertyAnimation {duration: 300}}
Behavior on width { PropertyAnimation {duration: 200}}
Behavior on opacity { FadeAnimation {}}
height: Theme.itemSizeLarge
property int itemIndex: index
property bool itemIsActive: tabView.currentIndex === itemIndex

View file

@ -299,7 +299,7 @@ Page {
if (!chatPage.isInitialized) {
chatModel.initialize(chatInformation);
pageStack.pushAttached(Qt.resolvedUrl("../pages/ChatInformationPage.qml"), { "chatInformation" : chatInformation, "privateChatUserInformation": chatPartnerInformation, "groupInformation": chatGroupInformation, "chatOnlineMemberCount": chatOnlineMemberCount});
pageStack.pushAttached(Qt.resolvedUrl("ChatInformationPage.qml"), { "chatInformation" : chatInformation, "privateChatUserInformation": chatPartnerInformation, "groupInformation": chatGroupInformation, "chatOnlineMemberCount": chatOnlineMemberCount});
chatPage.isInitialized = true;
}
break;