From d145175d280b0ee3b8deeb3af67e02c766426241 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 20 Nov 2015 22:03:31 +0300 Subject: [PATCH] some fixes for the 0.9.11.dev version --- Telegram/SourceFiles/apiwrap.cpp | 3 ++- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/overviewwidget.cpp | 2 +- Telegram/SourceFiles/pspecific_mac.cpp | 2 +- Telegram/SourceFiles/structs.h | 6 +++++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index f8ac55a2d..de2fad889 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -651,7 +651,8 @@ bool ApiWrap::gotSelfParticipantFail(ChannelData *channel, const RPCError &error void ApiWrap::kickParticipant(PeerData *peer, UserData *user) { KickRequest req(peer, user); - if (_kickRequests.contains(req)); + if (_kickRequests.contains(req)) return; + if (peer->isChannel()) { _kickRequests.insert(req, MTP::send(MTPchannels_KickFromChannel(peer->asChannel()->inputChannel, user->inputUser, MTP_bool(true)), rpcDone(&ApiWrap::kickParticipantDone, req), rpcFail(&ApiWrap::kickParticipantFail, req))); } diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 93035ba4a..ebdc3f962 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -697,7 +697,7 @@ void Application::checkMapVersion() { if (Local::oldMapVersion()) { QString versionFeatures; if (cDevVersion() && Local::oldMapVersion() < 9011) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Groups can now have multiple administrators with the ability to edit the name and logo, and add and remove members.\n\xe2\x80\x94 Groups that have reached their capacity of 200 users can be upgraded to supergroups of up to 1,000 members.\n\nWARNING: Only updated Telegram apps will be able to open supergroups. DO NOT upgrade your groups, before the stable version is out and updates for other apps are released.");// .replace('@', qsl("@") + QChar(0x200D)); + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Groups can now have multiple administrators with the ability to edit the name and logo, and add and remove members.\n\xe2\x80\x94 Groups that have reached their capacity of 200 users can be upgraded to supergroups of up to 1,000 members.\n\nWARNING: Only updated Telegram apps will be able to open supergroups. DO NOT upgrade your groups before the stable version is out and updates for other apps are released.");// .replace('@', qsl("@") + QChar(0x200D)); } else if (Local::oldMapVersion() < 9010) { versionFeatures = lang(lng_new_version_text).trimmed(); } else { diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index eee5c72ef..e85bc2630 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -324,7 +324,7 @@ void OverviewInner::fixItemIndex(int32 ¤t, MsgId msgId) const { void OverviewInner::searchReceived(SearchRequestType type, const MTPmessages_Messages &result, mtpRequestId req) { if (!_search.text().isEmpty()) { - if (_type == SearchFromStart) { + if (type == SearchFromStart) { SearchQueries::iterator i = _searchQueries.find(req); if (i != _searchQueries.cend()) { _searchCache[i.value()] = result; diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 2050cd58c..0b0a12eb4 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -72,7 +72,7 @@ void MacPrivate::notifyClicked(unsigned long long peer, int msgid) { bool tomsg = !history->peer->isUser() && (msgid > 0); if (tomsg) { HistoryItem *item = App::histItemById(peerToChannel(PeerId(peer)), MsgId(msgid)); - if (!item || !item->notifyByFrom()) { + if (!item || !item->mentionsMe()) { tomsg = false; } } diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 99cff07a6..c29b5fd85 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -526,7 +526,11 @@ private: }; struct MegagroupInfo { - MegagroupInfo() : botStatus(0), joinedMessageFound(false), migrateFromPtr(0), lastParticipantsStatus(LastParticipantsUpToDate), lastParticipantsCount(0) { + MegagroupInfo() : botStatus(0) + , joinedMessageFound(false) + , lastParticipantsStatus(LastParticipantsUpToDate) + , lastParticipantsCount(0) + , migrateFromPtr(0) { } typedef QList LastParticipants; LastParticipants lastParticipants;