Remove Redundant Parsing of Links (#4507)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/LinkParser.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/ignores/IgnoreController.hpp"
|
||||
@@ -465,12 +466,12 @@ void TwitchMessageBuilder::addTextOrEmoji(const QString &string_)
|
||||
}
|
||||
|
||||
// Actually just text
|
||||
auto linkString = this->matchLink(string);
|
||||
LinkParser parsed(string);
|
||||
auto textColor = this->textColor_;
|
||||
|
||||
if (!linkString.isEmpty())
|
||||
if (parsed.result())
|
||||
{
|
||||
this->addLink(string, linkString);
|
||||
this->addLink(*parsed.result());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user