fix: double ellipsis in reply (#5174)
This commit is contained in:
@@ -608,7 +608,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container,
|
||||
return e;
|
||||
};
|
||||
|
||||
static const auto ellipsis = QStringLiteral("...");
|
||||
static const auto ellipsis = QStringLiteral("…");
|
||||
|
||||
// String to continuously append words onto until we place it in the container
|
||||
// once we encounter an emote or reach the end of the message text. */
|
||||
@@ -628,6 +628,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container,
|
||||
currentText += ' ';
|
||||
}
|
||||
|
||||
bool done = false;
|
||||
for (const auto &parsedWord :
|
||||
app->getEmotes()->getEmojis()->parse(word.text))
|
||||
{
|
||||
@@ -641,6 +642,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container,
|
||||
container.remainingWidth());
|
||||
if (currentText != prev)
|
||||
{
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -663,6 +665,7 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container,
|
||||
emoteSize.width()))
|
||||
{
|
||||
currentText += ellipsis;
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -678,6 +681,11 @@ void SingleLineTextElement::addToContainer(MessageLayoutContainer &container,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (done)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Add the last of the pending message text to the container.
|
||||
|
||||
Reference in New Issue
Block a user