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 property alias membersList: membersList
function initializePage() { function initializePage() {
console.log("[ChatInformationPage] Initializing chat info page...");
membersList.clear(); membersList.clear();
var chatType = chatInformation.type["@type"]; var chatType = chatInformation.type["@type"];
switch(chatType) { switch(chatType) {
@ -294,7 +293,7 @@ SilicaFlickable {
id: contentFlickable id: contentFlickable
contentHeight: groupInfoItem.height + tabViewLoader.height contentHeight: groupInfoItem.height + tabViewLoader.height
clip: true clip: true
interactive: true//groupInfoItem.height > pageContent.height * 0.5 interactive: !scrollUpAnimation.running && !scrollDownAnimation.running
anchors { anchors {
top: headerItem.bottom top: headerItem.bottom
@ -435,7 +434,7 @@ SilicaFlickable {
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
opacity: (tabViewLoader.status === Loader.Ready && tabViewLoader.item.count > 0) ? 1.0 : 0.0 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 visible: imageContainer.tweenFactor > 0.8 && chatPictureDetail.imageStatus === Image.Ready
property bool isActive: imageContainer.tweenFactor === 1.0 property bool isActive: imageContainer.tweenFactor === 1.0
opacity: isActive ? 1.0 : 0.0 opacity: isActive ? 1.0 : 0.0
Behavior on opacity { NumberAnimation {} } Behavior on opacity { FadeAnimation {} }
ProfileThumbnail { ProfileThumbnail {
id: chatPictureDetail id: chatPictureDetail
anchors.fill: parent anchors.fill: parent

View file

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

View file

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

View file

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

View file

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

View file

@ -299,7 +299,7 @@ Page {
if (!chatPage.isInitialized) { if (!chatPage.isInitialized) {
chatModel.initialize(chatInformation); 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; chatPage.isInitialized = true;
} }
break; break;