[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [spacebar] app/package/contents/ui: [app] Make the MainPage pretty
From: Martin Klapetek <mklapetek () kde ! org>
Date: 2016-02-11 3:46:59
Message-ID: E1aTiDb-00071I-QS () scm ! kde ! org
[Download RAW message or body]
Git commit fa63ab352df10126168ccd0f225a23dca5a6f506 by Martin Klapetek.
Committed on 11/02/2016 at 03:46.
Pushed by mklapetek into branch 'master'.
[app] Make the MainPage pretty
M +43 -22 app/package/contents/ui/MainPage.qml
http://commits.kde.org/spacebar/fa63ab352df10126168ccd0f225a23dca5a6f506
diff --git a/app/package/contents/ui/MainPage.qml b/app/package/contents/ui/MainPage.qml
index 8b4c855..c32c67b 100644
--- a/app/package/contents/ui/MainPage.qml
+++ b/app/package/contents/ui/MainPage.qml
@@ -24,37 +24,58 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
-import org.kde.plasma.private.spacebar 1.0
+import org.kde.telepathy 0.1 as KTp
-ColumnLayout {
- id: rootLayout
+MobileComponents.Page {
anchors.fill: parent
- ListView {
- Layout.fillHeight: true
- Layout.fillWidth: true
+// MobileComponents.RefreshableScrollView {
+ ColumnLayout {
+ id: rootLayout
+ anchors.fill: parent
- model: MainLogModel {
- }
-
- delegate: PlasmaComponents.ListItem {
+ ListView {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
- onClicked: {
- root.pageStack.push(root.conversationPageComponent);
- }
+ model: KTp.MainLogModel {
+ id: mainModel
- ColumnLayout {
- PlasmaComponents.Label {
- text: model.lastMessageDate
- }
- PlasmaComponents.Label {
- text: model.contactIdRole
+ Component.onCompleted: {
+ mainModel.setAccountManager(telepathyManager.accountManager);
+ }
}
- PlasmaComponents.Label {
- text: model.lastMessageText
+ delegate: PlasmaComponents.ListItem {
+ enabled: true
+
+ onClicked: {
+ root.pageStack.pop();
+ root.pageStack.push(conversationPageComponent);
+ mainModel.startChat(accountId, contactId);
+ root.pageStack.currentPage.conversation = model.conversation;
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+
+ PlasmaExtras.Heading {
+ wrapMode: Text.WordWrap
+ text: model.contactId
+ level: 4
+ }
+ PlasmaComponents.Label {
+ wrapMode: Text.WordWrap
+ text: model.lastMessageText
+ }
+ PlasmaComponents.Label {
+ wrapMode: Text.WordWrap
+ text: Qt.formatDateTime(model.lastMessageDate)
+ }
+
+ }
}
}
}
- }
+// }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic