mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
You scored phrase for game service messages. Game layout bug fix.
This commit is contained in:
@@ -2959,7 +2959,8 @@ void HistoryGame::initDimensions() {
|
||||
_minh = 0;
|
||||
|
||||
int32 titleMinHeight = _title.isEmpty() ? 0 : _lineHeight;
|
||||
int32 descMaxLines = (4 + (titleMinHeight ? 0 : 1));
|
||||
// enable any count of lines in game description / message
|
||||
int descMaxLines = 4096;
|
||||
int32 descriptionMinHeight = _description.isEmpty() ? 0 : qMin(_description.minHeight(), descMaxLines * _lineHeight);
|
||||
|
||||
if (!_title.isEmpty()) {
|
||||
|
||||
@@ -1968,7 +1968,7 @@ bool HistoryService::preparePinnedText(const QString &from, QString *outText, Li
|
||||
|
||||
bool HistoryService::prepareGameScoreText(const QString &from, QString *outText, Links *outLinks) {
|
||||
bool result = false;
|
||||
QString text;
|
||||
QString gameTitle;
|
||||
|
||||
ClickHandlerPtr second;
|
||||
auto gamescore = Get<HistoryServiceGameScore>();
|
||||
@@ -1981,15 +1981,19 @@ bool HistoryService::prepareGameScoreText(const QString &from, QString *outText,
|
||||
}
|
||||
return lang(lng_deleted_message);
|
||||
};
|
||||
text = lng_action_game_score(lt_from, from, lt_count, gamescore->score, lt_game, getGameTitle());
|
||||
gameTitle = getGameTitle();
|
||||
result = true;
|
||||
} else if (gamescore && gamescore->msgId) {
|
||||
text = lng_action_game_score(lt_from, from, lt_count, gamescore->score, lt_game, lang(lng_contacts_loading));
|
||||
gameTitle = lang(lng_contacts_loading);
|
||||
result = true;
|
||||
} else {
|
||||
text = lng_action_game_score(lt_from, from, lt_count, gamescore->score, lt_game, lang(lng_deleted_message));
|
||||
gameTitle = lang(lng_deleted_message);
|
||||
}
|
||||
if (_from->isSelf()) {
|
||||
*outText = lng_action_game_you_scored(lt_count, gamescore->score, lt_game, gameTitle);
|
||||
} else {
|
||||
*outText = lng_action_game_score(lt_from, from, lt_count, gamescore->score, lt_game, gameTitle);
|
||||
}
|
||||
*outText = text;
|
||||
if (second) {
|
||||
outLinks->push_back(second);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user