From: Dmytro Dragan Date: Wed, 5 Oct 2016 15:20:39 +0000 (+0300) Subject: TSAM-8414 Fixed scroll of new messages X-Git-Tag: submit/tizen/20161006.125030~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1db2c1bd0b7fe09f2f4392bf5209245758d4ee4d;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TSAM-8414 Fixed scroll of new messages Change-Id: I7ad1e6e52caef4eb928dd4d2b6ec38f79787c151 Signed-off-by: Dmytro Dragan --- diff --git a/src/Conversation/ConvList/Controller/src/ConvList.cpp b/src/Conversation/ConvList/Controller/src/ConvList.cpp index e4b4fb5b..7e4d1c8b 100644 --- a/src/Conversation/ConvList/Controller/src/ConvList.cpp +++ b/src/Conversation/ConvList/Controller/src/ConvList.cpp @@ -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(); } + diff --git a/src/Conversation/ConvList/Controller/src/ConvListItem.cpp b/src/Conversation/ConvList/Controller/src/ConvListItem.cpp index 4d92479b..8fb3b2e0 100644 --- a/src/Conversation/ConvList/Controller/src/ConvListItem.cpp +++ b/src/Conversation/ConvList/Controller/src/ConvListItem.cpp @@ -84,6 +84,7 @@ void ConvListItem::updateStatus() if(!msg) return; + updateTime(); m_Time = msg->getTime(); m_NetworkStatus = msg->getNetworkStatus(); m_IsRestrictedByDpm = msg->isRestrictedByDpm();