void demoteItem(ListItem &item);
/**
+ * @brief Promotes specified list-view item to the begin of the list.
+ * @param[in] item an item to be promoted.
+ */
+ void promoteItem(ListItem &item);
+
+ /**
* @brief Set filter for items
* @param[in] key The filter key
*/
elm_genlist_item_demote(item);
}
+void ListView::promoteItem(ListItem &item)
+{
+ elm_genlist_item_promote(item);
+}
+
void ListView::setFilter(void *key)
{
elm_genlist_filter_set(getEo(), key);
void deleteItems();
void updateItems(const MsgIdList &idList);
void updateItems();
+ void update(ThreadListItem &item);
void insertItem(const MsgThreadItem &msgThreadItem);
void insertItem(ThreadId id);
ThreadListItem *getItem(ThreadId id) const;
auto threadIdSet = getThreadIdSet(idList);
auto threadItems = getItems<ThreadListItem>();
- for(ThreadListItem *threadListItem: threadItems)
+ for(ThreadListItem *item: threadItems)
{
- if(threadIdSet.count(threadListItem->getThreadId()))
- threadListItem->update();
+ if(threadIdSet.count(item->getThreadId()))
+ update(*item);
}
updateRealizedItems();
auto items = getItems<ThreadListItem>();
for(ThreadListItem *item: items)
{
- item->update();
+ update(*item);
}
updateRealizedItems();
}
+void ThreadList::update(ThreadListItem &item)
+{
+ time_t time = item.getRawTime();
+ item.update();
+ if(item.getRawTime() < time)
+ {
+ // TODO: JIRA issue TSAM-8683
+ }
+ else if(item.getRawTime() > time)
+ {
+ // TODO: JIRA issue TSAM-8683
+ }
+}
+
std::set<ThreadId> ThreadList::getThreadIdSet(const MsgIdList &idList)
{
std::set<ThreadId> res;
ThreadListItem *item = getItem(id);
if(item)
{
- item->update();
+ update(*item);
updated = true;
}
else