mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use a separate string for voice chat ending in groups.
This commit is contained in:
parent
98180d3a9e
commit
4fae827f1e
2 changed files with 17 additions and 2 deletions
|
@ -1112,6 +1112,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_action_group_call_scheduled_group" = "{from} scheduled a voice chat for {date}";
|
"lng_action_group_call_scheduled_group" = "{from} scheduled a voice chat for {date}";
|
||||||
"lng_action_group_call_scheduled_channel" = "Voice chat scheduled for {date}";
|
"lng_action_group_call_scheduled_channel" = "Voice chat scheduled for {date}";
|
||||||
"lng_action_group_call_finished" = "Voice chat finished ({duration})";
|
"lng_action_group_call_finished" = "Voice chat finished ({duration})";
|
||||||
|
"lng_action_group_call_finished_group" = "{from} ended the voice chat ({duration})";
|
||||||
"lng_action_add_user" = "{from} added {user}";
|
"lng_action_add_user" = "{from} added {user}";
|
||||||
"lng_action_add_users_many" = "{from} added {users}";
|
"lng_action_add_users_many" = "{from} added {users}";
|
||||||
"lng_action_add_users_and_one" = "{accumulated}, {user}";
|
"lng_action_add_users_and_one" = "{accumulated}, {user}";
|
||||||
|
|
|
@ -338,6 +338,7 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||||
};
|
};
|
||||||
|
|
||||||
auto prepareGroupCall = [this](const MTPDmessageActionGroupCall &action) {
|
auto prepareGroupCall = [this](const MTPDmessageActionGroupCall &action) {
|
||||||
|
auto result = PreparedText{};
|
||||||
if (const auto duration = action.vduration()) {
|
if (const auto duration = action.vduration()) {
|
||||||
const auto seconds = duration->v;
|
const auto seconds = duration->v;
|
||||||
const auto days = seconds / 86400;
|
const auto days = seconds / 86400;
|
||||||
|
@ -350,9 +351,22 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||||
: (minutes > 1)
|
: (minutes > 1)
|
||||||
? tr::lng_group_call_duration_minutes(tr::now, lt_count, minutes)
|
? tr::lng_group_call_duration_minutes(tr::now, lt_count, minutes)
|
||||||
: tr::lng_group_call_duration_seconds(tr::now, lt_count, seconds);
|
: tr::lng_group_call_duration_seconds(tr::now, lt_count, seconds);
|
||||||
return PreparedText{ tr::lng_action_group_call_finished(tr::now, lt_duration, text) };
|
if (history()->peer->isBroadcast()) {
|
||||||
|
result.text = tr::lng_action_group_call_finished(
|
||||||
|
tr::now,
|
||||||
|
lt_duration,
|
||||||
|
text);
|
||||||
|
} else {
|
||||||
|
result.links.push_back(fromLink());
|
||||||
|
result.text = tr::lng_action_group_call_finished_group(
|
||||||
|
tr::now,
|
||||||
|
lt_from,
|
||||||
|
fromLinkText(),
|
||||||
|
lt_duration,
|
||||||
|
text);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
auto result = PreparedText{};
|
|
||||||
if (history()->peer->isBroadcast()) {
|
if (history()->peer->isBroadcast()) {
|
||||||
result.text = tr::lng_action_group_call_started_channel(tr::now);
|
result.text = tr::lng_action_group_call_started_channel(tr::now);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue