mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fixed first check for skipping translation.
This commit is contained in:
parent
7cdc3eb2b2
commit
f9a14fc6bc
1 changed files with 2 additions and 3 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue