mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Delayed mic init in group call settings.
This commit is contained in:
@@ -255,9 +255,7 @@ void GroupPanel::initWindow() {
|
|||||||
_window->setWindowIcon(
|
_window->setWindowIcon(
|
||||||
QIcon(QPixmap::fromImage(Image::Empty()->original(), Qt::ColorOnly)));
|
QIcon(QPixmap::fromImage(Image::Empty()->original(), Qt::ColorOnly)));
|
||||||
_window->setTitleStyle(st::callTitle);
|
_window->setTitleStyle(st::callTitle);
|
||||||
_window->setTitle(computeTitleRect()
|
_window->setTitle(tr::lng_group_call_title(tr::now));
|
||||||
? u" "_q
|
|
||||||
: tr::lng_group_call_title(tr::now));
|
|
||||||
|
|
||||||
base::install_event_filter(_window.get(), [=](not_null<QEvent*> e) {
|
base::install_event_filter(_window.get(), [=](not_null<QEvent*> e) {
|
||||||
if (e->type() == QEvent::Close && handleClose()) {
|
if (e->type() == QEvent::Close && handleClose()) {
|
||||||
@@ -590,7 +588,6 @@ void GroupPanel::refreshTitle() {
|
|||||||
tr::lng_group_call_title(),
|
tr::lng_group_call_title(),
|
||||||
st::groupCallHeaderLabel);
|
st::groupCallHeaderLabel);
|
||||||
_title->setAttribute(Qt::WA_TransparentForMouseEvents);
|
_title->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
_window->setTitle(u" "_q);
|
|
||||||
}
|
}
|
||||||
const auto best = _title->naturalWidth();
|
const auto best = _title->naturalWidth();
|
||||||
const auto from = (widget()->width() - best) / 2;
|
const auto from = (widget()->width() - best) / 2;
|
||||||
@@ -611,7 +608,6 @@ void GroupPanel::refreshTitle() {
|
|||||||
}
|
}
|
||||||
} else if (_title) {
|
} else if (_title) {
|
||||||
_title.destroy();
|
_title.destroy();
|
||||||
_window->setTitle(tr::lng_group_call_title(tr::now));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -101,10 +101,6 @@ void GroupCallSettingsBox(
|
|||||||
AddSkip(layout);
|
AddSkip(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
state->levelUpdateTimer.callEach(kMicTestUpdateInterval);
|
|
||||||
state->micTester = std::make_unique<Webrtc::AudioInputTester>(
|
|
||||||
settings.callInputDeviceId());
|
|
||||||
|
|
||||||
AddButtonWithLabel(
|
AddButtonWithLabel(
|
||||||
layout,
|
layout,
|
||||||
tr::lng_group_call_speakers(),
|
tr::lng_group_call_speakers(),
|
||||||
@@ -136,7 +132,9 @@ void GroupCallSettingsBox(
|
|||||||
const QString &id,
|
const QString &id,
|
||||||
const QString &name) {
|
const QString &name) {
|
||||||
state->inputNameStream.fire_copy(name);
|
state->inputNameStream.fire_copy(name);
|
||||||
state->micTester->setDeviceId(id);
|
if (state->micTester) {
|
||||||
|
state->micTester->setDeviceId(id);
|
||||||
|
}
|
||||||
}), &st::groupCallCheckbox, &st::groupCallRadio));
|
}), &st::groupCallCheckbox, &st::groupCallRadio));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -214,6 +212,15 @@ void GroupCallSettingsBox(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
box->setShowFinishedCallback([=] {
|
||||||
|
// Means we finished showing the box.
|
||||||
|
crl::on_main(box, [=] {
|
||||||
|
state->micTester = std::make_unique<Webrtc::AudioInputTester>(
|
||||||
|
Core::App().settings().callInputDeviceId());
|
||||||
|
state->levelUpdateTimer.callEach(kMicTestUpdateInterval);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
box->setTitle(tr::lng_group_call_settings_title());
|
box->setTitle(tr::lng_group_call_settings_title());
|
||||||
box->boxClosing(
|
box->boxClosing(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
|
Submodule Telegram/lib_ui updated: c4df097339...7fd90cb38b
Reference in New Issue
Block a user