2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

context bots started, all callbacks done by pointers

This commit is contained in:
John Preston
2015-12-29 00:20:04 +03:00
parent 43e173567f
commit 77228d358d
22 changed files with 416 additions and 237 deletions

View File

@@ -1430,9 +1430,10 @@ namespace App {
return ::self;
}
PeerData *peerByName(const QString &username) {
PeerData *peerByName(const QStringRef &username) {
QStringRef uname(username.trimmed());
for (PeersData::const_iterator i = peersData.cbegin(), e = peersData.cend(); i != e; ++i) {
if (!i.value()->userName().compare(username.trimmed(), Qt::CaseInsensitive)) {
if (!i.value()->userName().compare(uname, Qt::CaseInsensitive)) {
return i.value()->asUser();
}
}
@@ -2471,10 +2472,6 @@ namespace App {
::gifItems.remove(reader);
}
const GifItems &gifItems() {
return ::gifItems;
}
void stopGifItems() {
if (!::gifItems.isEmpty()) {
GifItems gifs = ::gifItems;