ConvListItem *insertItem(const MsgConversationItem &item);
void demoteItem(ConvListItem &item); // move down existing item
void clear();
+ void markAsRead();
private:
bool m_IsDeleteMode;
m_ThreadId = id;
fillList();
updateTitle();
+ markAsRead();
}
}
+void ConvList::markAsRead()
+{
+ if (m_ThreadId.isValid())
+ getMsgStorage().setReadStatus(m_ThreadId);
+}
+
+
void ConvList::onListItemSelected(ListItem &listItem)
{
MSG_LOG("");
// IMsgStorageListener:
void onMsgStorageThreadUpdate(const ThreadId &threadId) override;
void onMsgStorageThreadInsert(const ThreadId &threadId) override;
- void onMsgStorageThreadDelete(const ThreadId &threadId) override;;
+ void onMsgStorageThreadDelete(const ThreadId &threadId) override;
// IContactManagerListener:
void onContactChanged() override;
if (m_DeleteMode != value) {
m_DeleteMode = value;
setCheckMode(value);
- ThreadListViewItem::resetCheckMode(*this);
checkAllItems(false, true);
if (m_ComposeItem)
m_ComposeItem->disabled(value);
void ThreadList::navigateTo(ThreadListItem &item)
{
- ListView::showItem(item, ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ ListView::showItem(item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
}
void ThreadList::updateItems(const MsgIdList &idList)
void setState(State state, bool updateUi);
State getState() const;
- static void resetCheckMode(ListView &listView);
protected:
virtual std::string getName() = 0;
{
Evas_Object *content = nullptr;
- if (!strcmp(part, iconPart) || !strcmp(part, iconPaddingPart))
+ if (m_State == IconState && (!strcmp(part, iconPart) || !strcmp(part, iconPaddingPart)))
content = makeUnreadIcon(getUnreadCount());
return content;
evas_object_show(icon);
return icon;
}
-
-void ThreadListViewItem::resetCheckMode(ListView &listView)
-{
- // TODO: impl if needed.
-}