messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp
changeset 43 35b64624a9e7
parent 34 84197e66a4bd
child 44 36f374c67aa8
--- a/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp	Fri Jun 11 13:35:48 2010 +0300
+++ b/messagingapp/msgui/conversationview/src/msgcontactcardwidget.cpp	Wed Jun 23 18:09:17 2010 +0300
@@ -141,7 +141,9 @@
 ConvergedMessageAddressList MsgContactCardWidget::address()
 {
     ConvergedMessageAddressList addresses;
-    QModelIndex index = ConversationsEngine::instance()->getConversationsModel()->index(0, 0);
+    QStandardItemModel* msgModel = ConversationsEngine::instance()->getConversationsModel();
+    const int rowCnt = msgModel->rowCount();
+    QModelIndex index = msgModel->index(rowCnt-1, 0);
     ConvergedMessageAddress* address = new ConvergedMessageAddress(
         index.data(ConversationAddress).toString());
     address->setAlias(mAddress);