[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [spacebar] app/package/contents/ui: [app] Indentation cleanup
From:       Martin Klapetek <mklapetek () kde ! org>
Date:       2016-05-14 18:35:25
Message-ID: E1b1ePN-0005D3-90 () scm ! kde ! org
[Download RAW message or body]

Git commit 9674ba9a686c1e857ad810cad6f6f69e2f85c727 by Martin Klapetek.
Committed on 14/05/2016 at 18:32.
Pushed by mklapetek into branch 'master'.

[app] Indentation cleanup

M  +70   -79   app/package/contents/ui/ConversationPage.qml

http://commits.kde.org/spacebar/9674ba9a686c1e857ad810cad6f6f69e2f85c727

diff --git a/app/package/contents/ui/ConversationPage.qml \
b/app/package/contents/ui/ConversationPage.qml index 3be6ffe..95a636b 100644
--- a/app/package/contents/ui/ConversationPage.qml
+++ b/app/package/contents/ui/ConversationPage.qml
@@ -81,104 +81,95 @@ Kirigami.Page {
                 opacity: 0.4
             }
 
-    //             Flickable {
-    //                 id: conversationFlickable
-    //                 onAtYBeginningChanged: {
-    //                     if (conversationFlickable.atYBeginning) {
-    //
-    //                     }
-    //                 }
-
-                ListView {
-                    id: view
-                    property bool followConversation: true
+            ListView {
+                id: view
+                property bool followConversation: true
 
-                    Layout.fillWidth: true
-                    Layout.fillHeight: true
-
-                    boundsBehavior: Flickable.StopAtBounds
-
-                    section.property: "senderAlias"
-                    section.delegate: Kirigami.Label {
-                        anchors.right: parent.right
-                        anchors.left: parent.left
-                        height: paintedHeight * 1.5
-                        horizontalAlignment: section === conversation.title ? \
                Text.AlignLeft : Text.AlignRight
-                        verticalAlignment: Text.AlignBottom
-                        text: section
-                        font.bold: true
-                    }
-                    clip: true
+                Layout.fillWidth: true
+                Layout.fillHeight: true
+
+                boundsBehavior: Flickable.StopAtBounds
+
+                section.property: "senderAlias"
+                section.delegate: Kirigami.Label {
+                    anchors.right: parent.right
+                    anchors.left: parent.left
+                    height: paintedHeight * 1.5
+                    horizontalAlignment: section === conversation.title ? \
Text.AlignLeft : Text.AlignRight +                    verticalAlignment: \
Text.AlignBottom +                    text: section
+                    font.bold: true
+                }
+                clip: true
 
-                    add: Transition {
-                        id: addTrans
-                        NumberAnimation {
-                            properties: "x"
-                            //FIXME: this doesn't seem to do what it should
-                            from: addTrans.ViewTransition.item.isIncoming ? -100 : \
                100
-                            duration: 60
+                add: Transition {
+                    id: addTrans
+                    NumberAnimation {
+                        properties: "x"
+                        //FIXME: this doesn't seem to do what it should
+                        from: addTrans.ViewTransition.item.isIncoming ? -100 : 100
+                        duration: 60
 
-                        }
-                        PropertyAnimation {
-                            properties: "opacity"
-                            from: 0.0
-                            to: 1.0
-                            duration: 60
-                        }
                     }
+                    PropertyAnimation {
+                        properties: "opacity"
+                        from: 0.0
+                        to: 1.0
+                        duration: 60
+                    }
+                }
 
-                    //we need this so that scrolling down to the last element works \
                properly
-                    //this means that all the list is in memory
-                    cacheBuffer: Math.max(0, contentHeight)
-
-                    delegate: Loader {
-                        Component.onCompleted: {
-                            switch (model.type) {
-                                case MessagesModel.MessageTypeOutgoing:
-                                case MessagesModel.MessageTypeIncoming:
-                                    source = "TextDelegate.qml"
-                                    break;
-                                case MessagesModel.MessageTypeAction:
-                                    source = "ActionDelegate.qml";
-                                    break;
-                            }
+                //we need this so that scrolling down to the last element works \
properly +                //this means that all the list is in memory
+                cacheBuffer: Math.max(0, contentHeight)
+
+                delegate: Loader {
+                    Component.onCompleted: {
+                        switch (model.type) {
+                            case MessagesModel.MessageTypeOutgoing:
+                            case MessagesModel.MessageTypeIncoming:
+                                source = "TextDelegate.qml"
+                                break;
+                            case MessagesModel.MessageTypeAction:
+                                source = "ActionDelegate.qml";
+                                break;
                         }
                     }
+                }
 
-                    model: conversation.messages
+                model: conversation.messages
 
-                    Connections {
-                        target: conversation.messages
+                Connections {
+                    target: conversation.messages
 
-                        onRowsInserted: {
-                            if (view.followConversation) {
-                                view.positionViewAtEnd();
-                            }
+                    onRowsInserted: {
+                        if (view.followConversation) {
+                            view.positionViewAtEnd();
                         }
                     }
+                }
 
-                    onMovementEnded: followConversation = atYEnd //we only follow \
the conversation if moved to the end +                onMovementEnded: \
followConversation = atYEnd //we only follow the conversation if moved to the end  
-                    onContentHeightChanged: {
-                        if (followConversation && contentHeight > height) {
-                            view.positionViewAtEnd()
-                        }
+                onContentHeightChanged: {
+                    if (followConversation && contentHeight > height) {
+                        view.positionViewAtEnd()
                     }
+                }
 
-                    onAtYBeginningChanged: {
-                        if (atYBeginning) {
-                            model.fetchMoreHistory();
-                        }
+                onAtYBeginningChanged: {
+                    if (atYBeginning) {
+                        model.fetchMoreHistory();
                     }
+                }
 
-                    Component.onCompleted: {
-                        conversation.messages.visibleToUser = true;
-                    }
+                Component.onCompleted: {
+                    conversation.messages.visibleToUser = true;
+                }
 
-                    Component.onDestruction: {
-                        conversation.messages.visibleToUser = false;
-                    }
-    //                 }
+                Component.onDestruction: {
+                    conversation.messages.visibleToUser = false;
+                }
             }
 
             Kirigami.Label {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic