Fixed voice recording cancel.

This commit is contained in:
23rd 2020-10-05 16:52:41 +03:00
parent 616531b0d0
commit 4d40336be0
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ void Instance::start() {
void Instance::stop(Fn<void(Result&&)> callback) {
InvokeQueued(_inner.get(), [=] {
if (!callback) {
_inner->stop();
return;
}
_inner->stop([=](Result &&result) {
crl::on_main([=, result = std::move(result)]() mutable {
callback(std::move(result));