2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Use separate strings for channel voice chats.

This commit is contained in:
John Preston
2021-08-31 17:59:29 +03:00
parent 2c07bdd0e8
commit e9a5c45f34
13 changed files with 186 additions and 76 deletions

View File

@@ -1066,17 +1066,26 @@ void SessionController::startOrJoinGroupCall(
// Do you want to leave your active voice chat
// to join a voice chat in this group?
askConfirmation(
tr::lng_call_leave_to_other_sure(tr::now),
(peer->isBroadcast()
? tr::lng_call_leave_to_other_sure_channel
: tr::lng_call_leave_to_other_sure)(tr::now),
tr::lng_call_bar_hangup(tr::now));
} else if (confirm != GroupCallJoinConfirm::None
&& calls.inGroupCall()) {
if (calls.currentGroupCall()->peer() == peer) {
const auto now = calls.currentGroupCall()->peer();
if (now == peer) {
calls.activateCurrentCall(joinHash);
} else if (calls.currentGroupCall()->scheduleDate()) {
calls.startOrJoinGroupCall(peer, joinHash);
} else {
askConfirmation(
tr::lng_group_call_leave_to_other_sure(tr::now),
((peer->isBroadcast() && now->isBroadcast())
? tr::lng_group_call_leave_channel_to_other_sure_channel
: now->isBroadcast()
? tr::lng_group_call_leave_channel_to_other_sure
: peer->isBroadcast()
? tr::lng_group_call_leave_to_other_sure_channel
: tr::lng_group_call_leave_to_other_sure)(tr::now),
tr::lng_group_call_leave(tr::now));
}
} else {