2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

fixed shared memory locations, scheme updated

This commit is contained in:
John Preston
2015-12-29 20:54:34 +08:00
parent 820339d390
commit cdcd9d8d54
15 changed files with 976 additions and 366 deletions

View File

@@ -271,8 +271,8 @@ void FlatTextarea::getMentionHashtagBotCommandStart(QString &start, UserData *&c
}
break;
}
if (usernameLength) {
QStringRef username = text.midRef(1, usernameLength);
if (usernameLength && usernameStart + usernameLength < text.size() && text.at(usernameStart + usernameLength).isSpace()) {
QStringRef username = text.midRef(usernameStart, usernameLength);
if (username != contextBotUsername) {
contextBotUsername = username.toString();
PeerData *peer = App::peerByName(contextBotUsername);
@@ -292,6 +292,7 @@ void FlatTextarea::getMentionHashtagBotCommandStart(QString &start, UserData *&c
contextBot = 0;
} else {
start = text.mid(usernameStart + usernameLength + 1);
return;
}
} else {
contextBot = 0;