mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix memory leak in downloads thumbnail loading.
This commit is contained in:
parent
615ad85d26
commit
1da9df690f
1 changed files with 7 additions and 6 deletions
|
@ -1123,13 +1123,14 @@ rpl::producer<Ui::DownloadBarContent> MakeDownloadBarContent() {
|
|||
state->thumbnail = Images::Prepare(embed->original(), 0, {
|
||||
.options = Images::Option::Blur,
|
||||
});
|
||||
} else if (!state->downloadTaskLifetime) {
|
||||
state->document->session().downloaderTaskFinished(
|
||||
) | rpl::filter([=] {
|
||||
return self(self);
|
||||
}) | rpl::start_with_next(
|
||||
state->push,
|
||||
state->downloadTaskLifetime);
|
||||
}
|
||||
state->document->session().downloaderTaskFinished(
|
||||
) | rpl::filter([=] {
|
||||
return self(self);
|
||||
}) | rpl::start_with_next(
|
||||
state->push,
|
||||
state->downloadTaskLifetime);
|
||||
return !state->thumbnail.isNull();
|
||||
};
|
||||
const auto resolveThumbnail = [=] {
|
||||
|
|
Loading…
Add table
Reference in a new issue