TSAM-8414 Fixed scroll of new messages 88/91088/1
authorDmytro Dragan <dm.dragan@samsung.com>
Wed, 5 Oct 2016 15:20:39 +0000 (18:20 +0300)
committerDmytro Dragan <dm.dragan@samsung.com>
Wed, 5 Oct 2016 15:21:48 +0000 (18:21 +0300)
Change-Id: I7ad1e6e52caef4eb928dd4d2b6ec38f79787c151
Signed-off-by: Dmytro Dragan <dm.dragan@samsung.com>
src/Conversation/ConvList/Controller/src/ConvList.cpp
src/Conversation/ConvList/Controller/src/ConvListItem.cpp

index e4b4fb5b7c596f086a6c739683353fba179076c6..7e4d1c8b31de7d99b45e807bd04b21a696501bd3 100644 (file)
@@ -191,7 +191,7 @@ void ConvList::navigateToBottom()
 {
     ListItem *item = m_pList->getLastItem();
     if(item)
-        m_pList->showItem(*item, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
+        m_pList->showItem(*item, ELM_GENLIST_ITEM_SCROLLTO_TOP);
 }
 
 ConvListItem *ConvList::getItem(MsgId msgId) const
@@ -397,8 +397,10 @@ void ConvList::onMsgStorageUpdate(const MsgIdList &msgIdList)
         ConvListItem *updated = getItem(itemId);
         if(updated)
         {
+            time_t beforeTime = updated->getRawTime();
             updated->updateStatus();
-            demoteItem(updated);
+            if(beforeTime != updated->getRawTime())
+                demoteItem(updated);
         }
     }
 }
@@ -501,3 +503,4 @@ void ConvList::onLanguageChanged()
 
     m_pList->updateRealizedItems();
 }
+
index 4d92479bf0bb3b42ff7a2007e980520851d743d5..8fb3b2e01ad6a9b6679188ecca8d45784193fb15 100644 (file)
@@ -84,6 +84,7 @@ void ConvListItem::updateStatus()
     if(!msg)
         return;
 
+    updateTime();
     m_Time = msg->getTime();
     m_NetworkStatus = msg->getNetworkStatus();
     m_IsRestrictedByDpm = msg->isRestrictedByDpm();