mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Share instead of Settings for scheduled voice chats.
This commit is contained in:
@@ -244,6 +244,9 @@ GroupCall::GroupCall(
|
||||
} else {
|
||||
start(info.scheduleDate);
|
||||
}
|
||||
if (_scheduleDate) {
|
||||
saveDefaultJoinAs(_joinAs);
|
||||
}
|
||||
|
||||
_mediaDevices->audioInputId(
|
||||
) | rpl::start_with_next([=](QString id) {
|
||||
@@ -465,6 +468,14 @@ void GroupCall::setJoinAs(not_null<PeerData*> as) {
|
||||
}
|
||||
}
|
||||
|
||||
void GroupCall::saveDefaultJoinAs(not_null<PeerData*> as) {
|
||||
setJoinAs(as);
|
||||
_api.request(MTPphone_SaveDefaultGroupCallJoinAs(
|
||||
_peer->input,
|
||||
_joinAs->input
|
||||
)).send();
|
||||
}
|
||||
|
||||
void GroupCall::rejoin(not_null<PeerData*> as) {
|
||||
if (state() != State::Joining
|
||||
&& state() != State::Joined
|
||||
@@ -695,11 +706,7 @@ void GroupCall::rejoinAs(Group::JoinInfo info) {
|
||||
.nowJoinAs = info.joinAs,
|
||||
};
|
||||
if (_scheduleDate) {
|
||||
setJoinAs(info.joinAs);
|
||||
_api.request(MTPphone_SaveDefaultGroupCallJoinAs(
|
||||
_peer->input,
|
||||
_joinAs->input
|
||||
)).send();
|
||||
saveDefaultJoinAs(info.joinAs);
|
||||
} else {
|
||||
setState(State::Joining);
|
||||
rejoin(info.joinAs);
|
||||
|
Reference in New Issue
Block a user