some fixes for the 0.9.11.dev version

This commit is contained in:
John Preston 2015-11-20 22:03:31 +03:00
parent 0ef129802b
commit d145175d28
5 changed files with 10 additions and 5 deletions

View File

@ -651,7 +651,8 @@ bool ApiWrap::gotSelfParticipantFail(ChannelData *channel, const RPCError &error
void ApiWrap::kickParticipant(PeerData *peer, UserData *user) { void ApiWrap::kickParticipant(PeerData *peer, UserData *user) {
KickRequest req(peer, user); KickRequest req(peer, user);
if (_kickRequests.contains(req)); if (_kickRequests.contains(req)) return;
if (peer->isChannel()) { 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))); _kickRequests.insert(req, MTP::send(MTPchannels_KickFromChannel(peer->asChannel()->inputChannel, user->inputUser, MTP_bool(true)), rpcDone(&ApiWrap::kickParticipantDone, req), rpcFail(&ApiWrap::kickParticipantFail, req)));
} }

View File

@ -697,7 +697,7 @@ void Application::checkMapVersion() {
if (Local::oldMapVersion()) { if (Local::oldMapVersion()) {
QString versionFeatures; QString versionFeatures;
if (cDevVersion() && Local::oldMapVersion() < 9011) { 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) { } else if (Local::oldMapVersion() < 9010) {
versionFeatures = lang(lng_new_version_text).trimmed(); versionFeatures = lang(lng_new_version_text).trimmed();
} else { } else {

View File

@ -324,7 +324,7 @@ void OverviewInner::fixItemIndex(int32 &current, MsgId msgId) const {
void OverviewInner::searchReceived(SearchRequestType type, const MTPmessages_Messages &result, mtpRequestId req) { void OverviewInner::searchReceived(SearchRequestType type, const MTPmessages_Messages &result, mtpRequestId req) {
if (!_search.text().isEmpty()) { if (!_search.text().isEmpty()) {
if (_type == SearchFromStart) { if (type == SearchFromStart) {
SearchQueries::iterator i = _searchQueries.find(req); SearchQueries::iterator i = _searchQueries.find(req);
if (i != _searchQueries.cend()) { if (i != _searchQueries.cend()) {
_searchCache[i.value()] = result; _searchCache[i.value()] = result;

View File

@ -72,7 +72,7 @@ void MacPrivate::notifyClicked(unsigned long long peer, int msgid) {
bool tomsg = !history->peer->isUser() && (msgid > 0); bool tomsg = !history->peer->isUser() && (msgid > 0);
if (tomsg) { if (tomsg) {
HistoryItem *item = App::histItemById(peerToChannel(PeerId(peer)), MsgId(msgid)); HistoryItem *item = App::histItemById(peerToChannel(PeerId(peer)), MsgId(msgid));
if (!item || !item->notifyByFrom()) { if (!item || !item->mentionsMe()) {
tomsg = false; tomsg = false;
} }
} }

View File

@ -526,7 +526,11 @@ private:
}; };
struct MegagroupInfo { 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<UserData*> LastParticipants; typedef QList<UserData*> LastParticipants;
LastParticipants lastParticipants; LastParticipants lastParticipants;