Fixed first check for skipping translation.

This commit is contained in:
23rd 2022-11-23 18:50:50 +03:00 committed by John Preston
parent 7cdc3eb2b2
commit f9a14fc6bc

View file

@ -317,11 +317,10 @@ bool SkipTranslate(TextWithEntities textWithEntities) {
if (!Core::App().settings().translateButtonEnabled()) {
return true;
}
auto hasLetters = false;
constexpr auto kFirstChunk = 100;
constexpr auto kFirstChunk = size_t(100);
auto hasLetters = (text.size() >= kFirstChunk);
for (auto i = 0; i < kFirstChunk; i++) {
if (i >= text.size()) {
hasLetters = true; // Rest characters are unknown.
break;
}
if (text.at(i).isLetter()) {