Skip to content

Commit

Permalink
Merge branch 'games_branch'
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Oct 3, 2016
2 parents 9fdd751 + b600050 commit 79a9095
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/boxes/report_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ void ReportBox::onChange() {
connect(_reasonOtherText, SIGNAL(submitted(bool)), this, SLOT(onReport()));
connect(_reasonOtherText, SIGNAL(cancelled()), this, SLOT(onClose()));
}
_reasonOtherText->setFocus();
} else if (_reasonOtherText) {
_reasonOtherText.destroy();
updateMaxHeight();
}
_reasonOtherText->setFocus();
}

void ReportBox::doSetInnerFocus() {
Expand Down
12 changes: 7 additions & 5 deletions Telegram/SourceFiles/history/history_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2011,10 +2011,11 @@ bool HistoryService::prepareGameScoreText(const QString &from, QString *outText,
} else {
gameTitle = lang(lng_deleted_message);
}
auto scoreNumber = gamescore ? gamescore->score : 0;
if (_from->isSelf()) {
*outText = lng_action_game_you_scored(lt_count, gamescore->score, lt_game, gameTitle);
*outText = lng_action_game_you_scored(lt_count, scoreNumber, lt_game, gameTitle);
} else {
*outText = lng_action_game_score(lt_from, from, lt_count, gamescore->score, lt_game, gameTitle);
*outText = lng_action_game_score(lt_from, from, lt_count, scoreNumber, lt_game, gameTitle);
}
if (second) {
outLinks->push_back(second);
Expand Down Expand Up @@ -2212,12 +2213,13 @@ HistoryTextState HistoryService::getState(int x, int y, HistoryStateRequest requ
}

void HistoryService::createFromMtp(const MTPDmessageService &message) {
if (message.vaction.type() == mtpc_messageActionGameScore) {
UpdateComponents(HistoryServiceGameScore::Bit());
Get<HistoryServiceGameScore>()->score = message.vaction.c_messageActionGameScore().vscore.v;
}
if (message.has_reply_to_msg_id()) {
if (message.vaction.type() == mtpc_messageActionPinMessage) {
UpdateComponents(HistoryServicePinned::Bit());
} else if (message.vaction.type() == mtpc_messageActionGameScore) {
UpdateComponents(HistoryServiceGameScore::Bit());
Get<HistoryServiceGameScore>()->score = message.vaction.c_messageActionGameScore().vscore.v;
}
if (auto dependent = GetDependentData()) {
dependent->msgId = message.vreply_to_msg_id.v;
Expand Down

0 comments on commit 79a9095

Please sign in to comment.