void demoteItem(ConvListItem &item); // move down existing item
void clear();
void markAsRead();
+ void resendMsg(ConvListItem &listItem);
private:
bool m_IsDeleteMode;
void updateStatus();
void updateLangInfo();
void updateTime();
+ void setActionEventFlag(bool isAction = true);
+ bool getActionEventFlag() const;
protected:
Evas_Object *getBubbleContent() override;
WorkingDirRef m_WorkingDir;
BubbleEntityFactory &m_BubbleEntityFactory;
FileViewer m_FileViewer;
+ bool m_ActionEventFlag;
};
}
getMsgStorage().setReadStatus(m_ThreadId);
}
+void ConvList::resendMsg(ConvListItem &listItem)
+{
+ MSG_LOG("");
+ MessageRef msg = getMsgStorage().getMessage(listItem.getMsgId());
+ if (msg)
+ App::getInst().getMsgEngine().getTransport().sendMessage(msg);
+}
+
void ConvList::onListItemSelected(ListItem &listItem)
{
MSG_LOG("");
if (dynamic_cast<ConvReplyListItem*>(&listItem) && m_pListener)
m_pListener->onReplyButtonClicked(*this);
+
+ auto *convItem = dynamic_cast<ConvListItem*>(&listItem);
+ if (convItem) {
+ if (convItem->getStatusType() == ConvListViewItem::FailedStatus && !convItem->getActionEventFlag())
+ resendMsg(*convItem);
+
+ convItem->setActionEventFlag(false);
+ }
}
void ConvList::onListItemLongPressed(ListItem &listItem)
, m_Type(item.getType())
, m_WorkingDir(workingDir)
, m_BubbleEntityFactory(bubbleEntityFactory)
+ , m_ActionEventFlag(false)
{
prepareContent(item);
updateViewStatus();
updateTime();
}
+void ConvListItem::setActionEventFlag(bool isAction)
+{
+ m_ActionEventFlag = isAction;
+}
+
+bool ConvListItem::getActionEventFlag() const
+{
+ return m_ActionEventFlag;
+}
+
void ConvListItem::showMobileDataOffPopup()
{
ToastPopup::toast(msgt("WDS_MSG_TPOP_UNABLE_TO_RETRIEVE_MESSAGE_MOBILE_DATA_OFF_ABB"), nullptr);
MSG_LOG("");
if (auto *audio = dynamic_cast<BubbleAudioEntity*>(&item.getEntity())) {
audio->clickHandler();
+ setActionEventFlag();
} else {
std::string filePath = item.getEntity().getFilePath();
- if (!filePath.empty())
+ if (!filePath.empty()) {
+ setActionEventFlag();
m_FileViewer.launchWithCopy(filePath);
+ }
}
}
void setCheckedState(bool state, bool updateUi) override;
void setInfoStatus(InfoStatusType statusType);
+ InfoStatusType getStatusType() const;
protected:
virtual Evas_Object *getBubbleContent() = 0;
}
}
+ConvListViewItem::InfoStatusType ConvListViewItem::getStatusType() const
+{
+ return m_Status;
+}
+
std::string ConvListViewItem::getText(ListItem &item, const char *part)
{
if (m_Status == NoneStatus || m_Type == Received) {