version 0.8.27.dev ready

This commit is contained in:
John Preston 2015-06-17 23:07:25 +03:00
parent 609868858b
commit 9b863fcf5b
3 changed files with 9 additions and 9 deletions

View File

@ -546,7 +546,7 @@ namespace App {
i = chat->participants.erase(i);
} else {
if (i.key()->botInfo) {
botStatus = (botStatus > 0 || i.key()->botInfo->readsAllHistory) ? 2 : 1;
botStatus = (botStatus > 0/* || i.key()->botInfo->readsAllHistory*/) ? 2 : 1;
if (requestBotInfos && !i.key()->botInfo->inited) App::api()->requestFullPeer(i.key());
}
++i;
@ -578,7 +578,7 @@ namespace App {
}
chat->count++;
if (user->botInfo) {
chat->botStatus = (chat->botStatus > 0 || !user->botInfo->readsAllHistory) ? 2 : 1;
chat->botStatus = (chat->botStatus > 0/* || !user->botInfo->readsAllHistory*/) ? 2 : 1;
if (!user->botInfo->inited) App::api()->requestFullPeer(user);
}
}
@ -609,7 +609,7 @@ namespace App {
int32 botStatus = -1;
for (ChatData::Participants::const_iterator j = chat->participants.cbegin(), e = chat->participants.cend(); j != e; ++j) {
if (j.key()->botInfo) {
if (botStatus > 0 || !j.key()->botInfo->readsAllHistory) {
if (botStatus > 0/* || !j.key()->botInfo->readsAllHistory*/) {
botStatus = 2;
break;
}

View File

@ -2483,10 +2483,10 @@ void MentionsInner::paintEvent(QPaintEvent *e) {
int32 botStatus = _parent->chat() ? _parent->chat()->botStatus : -1;
if (hasUsername || botStatus == 0 || botStatus == 2) {
toHighlight += '@' + user->username;
if (botStatus == 0 || botStatus == 2) {
user->photo->load();
p.drawPixmap(st::mentionPadding.left(), i * st::mentionHeight + st::mentionPadding.top(), user->photo->pixRounded(st::mentionPhotoSize));
}
}
if (_parent->chat() || botStatus == 0 || botStatus == 2) {
user->photo->load();
p.drawPixmap(st::mentionPadding.left(), i * st::mentionHeight + st::mentionPadding.top(), user->photo->pixRounded(st::mentionPhotoSize));
}
int32 addleft = 0, widthleft = htagwidth;

View File

@ -3617,7 +3617,7 @@ void HistoryWidget::sendBotCommand(const QString &cmd, MsgId replyTo) { // reply
hist->loadAround(0);
int32 botStatus = histPeer->chat ? histPeer->asChat()->botStatus : -1;
App::main()->sendPreparedText(hist, cmd, replyTo ? ((histPeer->chat && (botStatus == 0 || botStatus == 2)) ? replyTo : -1) : 0);
App::main()->sendPreparedText(hist, cmd, replyTo ? ((histPeer->chat/* && (botStatus == 0 || botStatus == 2)*/) ? replyTo : -1) : 0);
if (replyTo) {
cancelReply();
if (_keyboard.hasMarkup() && _keyboard.singleUse() && _keyboard.forMsgId() == replyTo) {
@ -3633,7 +3633,7 @@ void HistoryWidget::insertBotCommand(const QString &cmd) {
QString toInsert = cmd;
UserData *bot = histPeer->chat ? (App::hoveredLinkItem() ? (App::hoveredLinkItem()->toHistoryForwarded() ? App::hoveredLinkItem()->toHistoryForwarded()->fromForwarded() : App::hoveredLinkItem()->from()) : 0) : histPeer->asUser();
QString username = (bot && bot->botInfo) ? bot->username : QString();
if (cmd.indexOf('@') < 2 && !username.isEmpty()) {
if (cmd.indexOf('@') < 2 && histPeer->chat && !username.isEmpty() && (histPeer->asChat()->botStatus == 0 || histPeer->asChat()->botStatus == 2)) {
toInsert += '@' + username;
}
toInsert += ' ';