mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Fixed voice recording cancel.
This commit is contained in:
parent
616531b0d0
commit
4d40336be0
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue