mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 08:03:45 +08:00
Fixed retain cycles of credits entry image states.
This commit is contained in:
@@ -346,7 +346,7 @@ PaintRoundImageCallback GenerateCreditsPaintEntryCallback(
|
||||
|
||||
rpl::single(rpl::empty_value()) | rpl::then(
|
||||
photo->session().downloaderTaskFinished()
|
||||
) | rpl::on_next([=] {
|
||||
) | rpl::on_next([=, state = state.get()] {
|
||||
using Size = Data::PhotoSize;
|
||||
if (const auto large = state->view->image(Size::Large)) {
|
||||
state->imagePtr = large;
|
||||
@@ -396,7 +396,7 @@ PaintRoundImageCallback GenerateCreditsPaintEntryCallback(
|
||||
|
||||
rpl::single(rpl::empty_value()) | rpl::then(
|
||||
video->session().downloaderTaskFinished()
|
||||
) | rpl::on_next([=] {
|
||||
) | rpl::on_next([=, state = state.get()] {
|
||||
if (const auto thumbnail = state->view->thumbnail()) {
|
||||
state->imagePtr = thumbnail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user