mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Merge tag 'v6.7.8' into dev
# Conflicts: # .github/workflows/mac_packaged.yml # Telegram/Resources/winrc/Telegram.rc # Telegram/Resources/winrc/Updater.rc # Telegram/SourceFiles/api/api_chat_invite.h # Telegram/SourceFiles/boxes/language_box.cpp # Telegram/SourceFiles/boxes/send_files_box.h # Telegram/SourceFiles/boxes/sticker_set_box.cpp # Telegram/SourceFiles/core/version.h # Telegram/SourceFiles/data/data_types.h # Telegram/SourceFiles/history/history_item.cpp # Telegram/SourceFiles/history/history_widget.cpp # Telegram/SourceFiles/history/view/history_view_chat_section.cpp # Telegram/SourceFiles/history/view/history_view_message.cpp # Telegram/SourceFiles/history/view/history_view_translate_bar.cpp # Telegram/SourceFiles/history/view/history_view_translate_tracker.cpp # Telegram/SourceFiles/platform/mac/main_window_mac.mm # Telegram/SourceFiles/settings/sections/settings_main.cpp # Telegram/lib_ui # snap/snapcraft.yaml
This commit is contained in:
@@ -52,7 +52,7 @@ callBodyLayout: CallBodyLayout {
|
||||
participantsTop: 294px;
|
||||
muteStroke: 3px;
|
||||
muteSize: 36px;
|
||||
mutePosition: point(142px, 135px);
|
||||
mutePosition: point(140px, 135px);
|
||||
}
|
||||
callBodyWithPreview: CallBodyLayout {
|
||||
height: 185px;
|
||||
@@ -631,7 +631,6 @@ groupCallMenuAbout: FlatLabel(defaultFlatLabel) {
|
||||
textFg: groupCallMemberNotJoinedStatus;
|
||||
palette: groupCallTextPalette;
|
||||
minWidth: 200px;
|
||||
maxHeight: 92px;
|
||||
}
|
||||
callDeviceSelectionLabel: FlatLabel(defaultSubsectionTitle) {
|
||||
textFg: groupCallActiveFg;
|
||||
|
||||
@@ -1196,6 +1196,10 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
|
||||
raw->setIncomingVideoOutput(_videoIncoming->sink());
|
||||
raw->setAudioOutputDuckingEnabled(settings.callAudioDuckingEnabled());
|
||||
|
||||
_muted.value() | rpl::on_next([=](bool muted) {
|
||||
Core::App().mediaDevices().setCaptureMuted(muted);
|
||||
}, _instanceLifetime);
|
||||
|
||||
_state.value() | rpl::on_next([=](State state) {
|
||||
const auto track = (state != State::FailedHangingUp)
|
||||
&& (state != State::Failed)
|
||||
@@ -1207,10 +1211,6 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
|
||||
Core::App().mediaDevices().setCaptureMuteTracker(this, track);
|
||||
}, _instanceLifetime);
|
||||
|
||||
_muted.value() | rpl::on_next([=](bool muted) {
|
||||
Core::App().mediaDevices().setCaptureMuted(muted);
|
||||
}, _instanceLifetime);
|
||||
|
||||
#if 0
|
||||
Core::App().batterySaving().value(
|
||||
) | rpl::on_next([=](bool isSaving) {
|
||||
|
||||
@@ -101,7 +101,6 @@ private:
|
||||
rpl::variable<bool> _isGroupConnecting = false;
|
||||
|
||||
std::vector<not_null<PeerData*>> _conferenceFirstUsers;
|
||||
int _conferenceUsersCount = 0;
|
||||
|
||||
QBrush _groupBrush;
|
||||
anim::linear_gradients<BarState> _gradients;
|
||||
|
||||
@@ -66,13 +66,28 @@ AboutItem::AboutItem(
|
||||
, _dummyAction(new QAction(parent)) {
|
||||
setPointerCursor(false);
|
||||
|
||||
_text->setSelectable(true);
|
||||
|
||||
const auto added = st.itemPadding.left() + st.itemPadding.right();
|
||||
|
||||
sizeValue(
|
||||
) | rpl::on_next([=](const QSize &s) {
|
||||
if (s.width() <= added) {
|
||||
return;
|
||||
}
|
||||
_text->resizeToWidth(s.width() - added);
|
||||
_text->moveToLeft(st.itemPadding.left(), st.itemPadding.top());
|
||||
}, lifetime());
|
||||
|
||||
_text->heightValue(
|
||||
) | rpl::on_next([=] {
|
||||
resize(width(), contentHeight());
|
||||
}, lifetime());
|
||||
|
||||
_text->resizeToWidth(parent->width() - added);
|
||||
fitToMenuWidth();
|
||||
enableMouseSelecting();
|
||||
enableMouseSelecting(_text.get());
|
||||
|
||||
_text->setSelectable(true);
|
||||
_text->resizeToWidth(st::groupCallMenuAbout.minWidth);
|
||||
_text->moveToLeft(st.itemPadding.left(), st.itemPadding.top());
|
||||
}
|
||||
|
||||
not_null<QAction*> AboutItem::action() const {
|
||||
|
||||
@@ -1606,6 +1606,7 @@ void GroupCall::rejoin(not_null<PeerData*> as) {
|
||||
_joinState.action = JoinAction::Joining;
|
||||
_joinState.ssrc = 0;
|
||||
_initialMuteStateSent = false;
|
||||
_systemMuteReconciled = false;
|
||||
setState(State::Joining);
|
||||
if (!tryCreateController()) {
|
||||
setInstanceMode(InstanceMode::None);
|
||||
@@ -1794,6 +1795,13 @@ void GroupCall::joinDone(
|
||||
: State::Joined);
|
||||
applyMeInCallLocally();
|
||||
maybeSendMutedUpdate(wasMuteState);
|
||||
_systemMuteReconciled = true;
|
||||
if (!_rtmp) {
|
||||
const auto state = muted();
|
||||
const auto nowMuted = (state != MuteState::Active)
|
||||
&& (state != MuteState::PushToTalk);
|
||||
Core::App().mediaDevices().setCaptureMuted(nowMuted);
|
||||
}
|
||||
|
||||
for (auto &state : _subchains) {
|
||||
// Accept initial join blocks.
|
||||
@@ -2699,8 +2707,8 @@ void GroupCall::setupMediaDevices() {
|
||||
const auto muted = (state != MuteState::Active)
|
||||
&& (state != MuteState::PushToTalk);
|
||||
const auto track = !muted || (state == MuteState::Muted);
|
||||
devices->setCaptureMuteTracker(this, track);
|
||||
devices->setCaptureMuted(muted);
|
||||
devices->setCaptureMuteTracker(this, track);
|
||||
}, _lifetime);
|
||||
}
|
||||
}
|
||||
@@ -2712,8 +2720,20 @@ void GroupCall::captureMuteChanged(bool mute) {
|
||||
|| oldState == MuteState::RaisedHand
|
||||
|| oldState == MuteState::Muted)) {
|
||||
return;
|
||||
} else if (!mute
|
||||
&& (oldState == MuteState::ForceMuted
|
||||
|| oldState == MuteState::RaisedHand)) {
|
||||
crl::on_main(this, [] {
|
||||
Core::App().mediaDevices().setCaptureMuted(true);
|
||||
});
|
||||
return;
|
||||
} else if (!mute && oldState != MuteState::Muted) {
|
||||
return;
|
||||
} else if (!mute && !_systemMuteReconciled) {
|
||||
crl::on_main(this, [] {
|
||||
Core::App().mediaDevices().setCaptureMuted(true);
|
||||
});
|
||||
return;
|
||||
}
|
||||
setMutedAndUpdate(mute ? MuteState::Muted : MuteState::Active);
|
||||
}
|
||||
|
||||
@@ -727,6 +727,7 @@ private:
|
||||
rpl::variable<bool> _emptyRtmp = false;
|
||||
rpl::variable<bool> _messagesEnabled = false;
|
||||
bool _initialMuteStateSent = false;
|
||||
bool _systemMuteReconciled = false;
|
||||
bool _acceptFields = false;
|
||||
|
||||
rpl::event_stream<Group::ParticipantState> _otherParticipantStateValue;
|
||||
|
||||
@@ -37,8 +37,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
namespace Calls::Group {
|
||||
namespace {
|
||||
|
||||
constexpr auto kPasswordCharAmount = 24;
|
||||
|
||||
void StartWithBox(
|
||||
not_null<Ui::GenericBox*> box,
|
||||
Fn<void()> done,
|
||||
|
||||
Reference in New Issue
Block a user