, m_Time(item.getTime())
, m_ThumbId(thumbId)
, m_BubbleEntityFactory(bubbleEntityFactory)
+ , m_IsRestrictedByDpm(item.isRestrictedByDpm())
{
prepareBubble(item, searchWord);
}
{
m_Time = msg->getTime();
m_NetworkStatus = msg->getNetworkStatus();
+ m_IsRestrictedByDpm = msg->isRestrictedByDpm();
}
if(m_NetworkStatus == Message::NS_Send_Fail)
else if(m_NetworkStatus == Message::NS_Received)
{
updateItemType(ConvItemType::Received);
- updateEntityBgType(BubbleBgViewItem::ReceivedStyle);
+ BubbleBgViewItem::BgType bgType = m_IsRestrictedByDpm ? BubbleBgViewItem::RestrictedStyle : BubbleBgViewItem::ReceivedStyle;
+ updateEntityBgType(bgType);
}
else if(m_NetworkStatus == Message::NS_Retrieving)
{
void ConvListItem::updateDownloadButton()
{
auto *downloadButton = findDownloadButton();
- downloadButton->disabled(m_NetworkStatus == Message::NS_Retrieving);
+ if(downloadButton)
+ downloadButton->disabled(m_NetworkStatus == Message::NS_Retrieving);
}
void ConvListItem::addEntity(BubbleEntity *entity)
{
BubbleBgViewItem::BgType bgType = getBubbleBgType(item);
Message::Direction direction = item.getDirection();
- if(item.isRestrictedByDpm())
+ if(m_IsRestrictedByDpm)
{
addEntity(createTextEntity(BubbleBgViewItem::RestrictedStyle, direction, msg("IDS_MSG_BODY_COULDNT_RECEIVE_THIS_MESSAGE_THE_SECURITY_POLICY_PREVENTS_RECEIVING_MESSAGES"), false, ""));
}
if(m_Type == Message::MT_MMS)
listPopup.appendItem(msg("IDS_MSG_OPT_VIEW_AS_SLIDESHOW_ABB"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onSlideShowItemPressed), this);
- if(m_Type == Message::MT_MMS_Noti)
+ if(m_Type == Message::MT_MMS_Noti && m_NetworkStatus != Message::NS_Retrieving)
listPopup.appendItem(msg("IDS_MSG_BUTTON_DOWNLOAD_ABB3"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onDownloadItemPressed), this);
if(!msgText.empty())
listPopup.appendItem(msg("IDS_MSG_OPT_COPY_TEXT"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onCopyTextItemPressed), this);
- listPopup.appendItem(msg("IDS_MSGF_OPT_FORWARD"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onForwardItemPressed), this);
- listPopup.appendItem(msg("IDS_COM_BUTTON_SHARE"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onShareItemPressed), this);
+ if(!m_IsRestrictedByDpm)
+ {
+ listPopup.appendItem(msg("IDS_MSGF_OPT_FORWARD"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onForwardItemPressed), this);
+ listPopup.appendItem(msg("IDS_COM_BUTTON_SHARE"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onShareItemPressed), this);
+ }
if(m_NetworkStatus == Message::NS_Send_Fail)
listPopup.appendItem(msg("IDS_MSG_OPT_EDIT"), POPUPLIST_ITEM_PRESSED_CB(ConvListItem, onEditItemPressed), this);