| 875 | } |
| 876 | |
| 877 | std::string NewsItem::GetStatusText() const |
| 878 | { |
| 879 | if (this->data != nullptr) { |
| 880 | /* CompanyNewsInformation is the only type of additional data used. */ |
| 881 | const CompanyNewsInformation &cni = *static_cast<const CompanyNewsInformation*>(this->data.get()); |
| 882 | return GetString(STR_MESSAGE_NEWS_FORMAT, cni.title, this->headline.GetDecodedString()); |
| 883 | } |
| 884 | |
| 885 | return this->headline.GetDecodedString(); |
| 886 | } |
| 887 | |
| 888 | /** |
| 889 | * Add a new newsitem to be shown. |
no test coverage detected