MAINT-8532 FIXED Group invite text is overlapped when an empty string is present in the group description ending

meow-7.2.2
maxim_productengine 2018-04-13 18:29:47 +03:00
parent 46817fcbd3
commit d6f1dc06ee
1 changed files with 1 additions and 3 deletions

View File

@ -288,9 +288,7 @@ BOOL LLGroupInviteNotificationListItem::postBuild()
//invitation with any non-default group role, doesn't have newline characters at the end unlike simple invitations
std::string invitation_desc = mNoticeTextExp->getValue().asString();
boost::regex pattern = boost::regex("\n\n$", boost::regex::perl|boost::regex::icase);
boost::match_results<std::string::const_iterator> matches;
if(!boost::regex_search(invitation_desc, matches, pattern))
if (invitation_desc.substr(invitation_desc.size() - 2) != "\n\n")
{
invitation_desc += "\n\n";
mNoticeTextExp->setValue(invitation_desc);