void updateViewStatus();
void prepareContent(const MsgConversationItem &item);
void launchImageViewer(const BubbleImageEntity &image);
+ bool launchViewer(const std::list<std::string> &fileList, unsigned index = 0);
// Popups:
void showMobileDataOffPopup();
m_BubbleEntityList = m_BubbleEntityFactory.create(item);
}
+bool ConvListItem::launchViewer(const std::list<std::string> &fileList, unsigned index)
+{
+ bool res = m_FileViewer.launchWithCopy(fileList, index);
+ if (!res)
+ ToastPopup::toast("Can't view this type of file on Gear"); // TODO: localization
+ return res;
+}
+
void ConvListItem::launchImageViewer(const BubbleImageEntity &image)
{
std::list<std::string> allFiles;
}
}
}
- m_FileViewer.launchWithCopy(allFiles, index);
+ launchViewer(allFiles, index);
}
void ConvListItem::onCancelButtonClicked(Popup &popup)
std::string filePath = item.getEntity().getFilePath();
if (!filePath.empty()) {
setActionEventFlag();
- m_FileViewer.launchWithCopy({filePath});
+ launchViewer({filePath});
}
}
}