Replaced auto types with explicit types in VoiceRecordBar's lambdas.

This commit is contained in:
23rd 2020-11-16 20:08:18 +03:00 committed by John Preston
parent 024a35d770
commit 980ce9fba3

View file

@ -691,7 +691,7 @@ void RecordLock::init() {
const auto &duration = st::historyRecordVoiceShowDuration; const auto &duration = st::historyRecordVoiceShowDuration;
const auto from = 0.; const auto from = 0.;
const auto to = 1.; const auto to = 1.;
auto callback = [=](auto value) { auto callback = [=](float64 value) {
update(); update();
if (value == to) { if (value == to) {
setCursor(style::cur_pointer); setCursor(style::cur_pointer);
@ -850,7 +850,7 @@ void RecordLock::drawProgress(Painter &p) {
} }
void RecordLock::startLockingAnimation(float64 to) { void RecordLock::startLockingAnimation(float64 to) {
auto callback = [=](auto value) { setProgress(value); }; auto callback = [=](float64 value) { setProgress(value); };
const auto &duration = st::historyRecordVoiceShowDuration; const auto &duration = st::historyRecordVoiceShowDuration;
_lockEnderAnimation.start(std::move(callback), 0., to, duration); _lockEnderAnimation.start(std::move(callback), 0., to, duration);
} }
@ -1033,7 +1033,7 @@ void VoiceRecordBar::init() {
const auto from = show ? 0. : 1.; const auto from = show ? 0. : 1.;
const auto &duration = st::historyRecordLockShowDuration; const auto &duration = st::historyRecordLockShowDuration;
_lock->show(); _lock->show();
auto callback = [=](auto value) { auto callback = [=](float64 value) {
updateLockGeometry(); updateLockGeometry();
if (value == 0. && !show) { if (value == 0. && !show) {
_lock->hide(); _lock->hide();
@ -1050,14 +1050,14 @@ void VoiceRecordBar::init() {
} }
::Media::Capture::instance()->startedChanges( ::Media::Capture::instance()->startedChanges(
) | rpl::filter([=](auto capturing) { ) | rpl::filter([=](bool capturing) {
return !capturing && _listen; return !capturing && _listen;
}) | rpl::take(1) | rpl::start_with_next([=] { }) | rpl::take(1) | rpl::start_with_next([=] {
_lockShowing = false; _lockShowing = false;
const auto to = 1.; const auto to = 1.;
const auto &duration = st::historyRecordVoiceShowDuration; const auto &duration = st::historyRecordVoiceShowDuration;
auto callback = [=](auto value) { auto callback = [=](float64 value) {
_listen->requestPaintProgress(value); _listen->requestPaintProgress(value);
_level->requestPaintProgress(to - value); _level->requestPaintProgress(to - value);
update(); update();