I have made the following changes intended for :
  nemo:testing:apps / qmlmessages

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.merproject.org//request/show/92

Thank You,
Marko Saukko

[This message was auto-generated]

---

Request # 92:

Messages from BOSS:

State: review at 2013-03-23T12:52:42 by cibot

Reviews:
       accepted by cibot : Prechecks succeeded.
       new for nemo:testing:apps : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: nemo:devel:apps / qmlmessages -> nemo:testing:apps / qmlmessages
  
changes files:
--------------
--- qmlmessages.changes
+++ qmlmessages.changes
@@ -0,0 +1,3 @@
+* Wed Mar 20 2013 John Brooks <[email protected]> - 0.1.4
+- Adapt to API changes in nemo-qml-plugin-messages (>= 0.1.0) and 
libcommhistory-declarative (>= 1.5.1)
+

old:
----
  qmlmessages-0.1.3.tar.bz2

new:
----
  qmlmessages-0.1.4.tar.bz2

spec files:
-----------
--- qmlmessages.spec
+++ qmlmessages.spec
@@ -9,7 +9,7 @@
 # << macros
 
 Summary:    Messaging application for nemo
-Version:    0.1.3
+Version:    0.1.4
 Release:    1
 Group:      Applications/System
 License:    BSD
@@ -17,8 +17,8 @@
 Source0:    %{name}-%{version}.tar.bz2
 Source100:  qmlmessages.yaml
 Requires:   qt-components >= 1.4.8
-Requires:   nemo-qml-plugin-messages-internal
-Requires:   libcommhistory-declarative
+Requires:   nemo-qml-plugin-messages-internal >= 0.1.0
+Requires:   libcommhistory-declarative >= 1.5.1
 Requires:   commhistory-daemon
 Requires:   nemo-qml-plugins-contacts
 Requires:   qmlcontacts

other changes:
--------------

++++++ qmlmessages-0.1.3.tar.bz2 -> qmlmessages-0.1.4.tar.bz2
--- qml/ConversationListWidget.qml
+++ qml/ConversationListWidget.qml
@@ -51,8 +51,9 @@
 
         delegate: ConversationListDelegate {
             onClicked: {
-                var group = groupManager.getConversationById(model.groupId)
-                pageStack.push(Qt.resolvedUrl("ConversationPage.qml"), { 
channel: group })
+                var group = model.group
+                var channel = channelManager.getConversation(group.localUid, 
group.remoteUids[0])
+                pageStack.push(Qt.resolvedUrl("ConversationPage.qml"), { 
"channel": channel, "group": group })
             }
         }
     }
--- qml/ConversationPage.qml
+++ qml/ConversationPage.qml
@@ -33,6 +33,7 @@
 import com.nokia.meego 1.0
 import org.nemomobile.messages.internal 1.0
 import org.nemomobile.qmlcontacts 1.0
+import org.nemomobile.commhistory 1.0
 
 /* ConversationPage has two states, depending on if it has an active
  * conversation or not. This is determined by whether the channel property
@@ -42,7 +43,7 @@
     id: conversationPage
 
     property QtObject channel: null
-    property QtObject group: channel ? groupModel.groupById(channel.groupId) : 
null
+    property QtObject group
     property QtObject person: group ? peopleModel.personById(group.contactId) 
: null
     tools: null
 
@@ -117,7 +118,7 @@
                 || accountSelector.selectedIndex < 0)
                 return
             console.log("startConversation", accountSelector.selectedUid, 
targetEditor.text);
-            channel = 
groupManager.getConversation(accountSelector.selectedUid, targetEditor.text)
+            channel = 
channelManager.getConversation(accountSelector.selectedUid, 
targetEditor.text.toLowerCase())
         }
     }
 
@@ -130,6 +131,14 @@
             topMargin: 10; bottomMargin: 10
             leftMargin: 5; rightMargin: 5
         }
+
+        model: conversationModel
+        
+        CommConversationModel {
+            id: conversationModel
+            useBackgroundThread: true
+            groupId: group ? group.id : -1
+        }
     }
 
     ChatTextInput {
@@ -152,15 +161,6 @@
 
     states: [
         State {
-            name: "active"
-            when: channel !== null
-
-            PropertyChanges {
-                target: messagesView
-                model: channel.model
-            }
-        },
-        State {
             name: "new"
             when: channel == null
 
@@ -188,8 +188,22 @@
     ]
 
     onChannelChanged: {
-        if (channel != null)
+        if (channel != null) {
             channel.ensureChannel()
+            _updateGroup()
+        }
+    }
+
+    function _updateGroup() {
+        if (group === null)
+            group = groupManager.findGroup(channel.localUid, channel.remoteUid)
+    }
+
+    Connections {
+        target: groupManager
+
+        onGroupAdded: _updateGroup()
+        onGroupUpdated: _updateGroup()
     }
 }
 
--- qml/main.qml
+++ qml/main.qml
@@ -47,17 +47,17 @@
         id: peopleModel
     }
 
-    GroupManager {
-        id: groupManager
+    TelepathyChannelManager {
+        id: channelManager
     }
 
-    TelepathyClientHandler {
-        groupManager: groupManager
+    CommGroupManager {
+        id: groupManager
     }
 
     CommGroupModel {
         id: groupModel
-        sourceModel: groupManager.groupModel
+        manager: groupManager
     }
 
     MessagesContextProvider {
@@ -89,7 +89,7 @@
             return
         }
 
-        var group = groupManager.getConversation(localUid, remoteUid)
+        var group = channelManager.getConversation(localUid, remoteUid)
         if (!group || group == contextProvider.currentConversation)
             return
 

++++++ qmlmessages.yaml
--- qmlmessages.yaml
+++ qmlmessages.yaml
@@ -1,6 +1,6 @@
 Name:  qmlmessages
 Summary: Messaging application for nemo
-Version: 0.1.3
+Version: 0.1.4
 Release: 1
 Group: Applications/System
 License: BSD
@@ -42,8 +42,8 @@
 
 Requires:
     - qt-components >= 1.4.8
-    - nemo-qml-plugin-messages-internal
-    - libcommhistory-declarative
+    - nemo-qml-plugin-messages-internal >= 0.1.0
+    - libcommhistory-declarative >= 1.5.1
     - commhistory-daemon
 # C++ contacts APIs
     - nemo-qml-plugins-contacts



Reply via email to