mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix crash in session destruction.
Also use rpl::event_stream for downloaderTaskFinished.
This commit is contained in:
@@ -812,8 +812,7 @@ void AppendEmojiPacks(
|
||||
[self setNeedsDisplayInRect:PeerRectByIndex(userpicIndex)];
|
||||
};
|
||||
const auto listenToDownloaderFinished = [=] {
|
||||
base::ObservableViewer(
|
||||
_session->downloaderTaskFinished()
|
||||
_session->downloaderTaskFinished(
|
||||
) | rpl::start_with_next([=] {
|
||||
const auto all = ranges::all_of(_pins, [=](const auto &pin) {
|
||||
return (!pin->peer->hasUserpic())
|
||||
@@ -1193,8 +1192,7 @@ void AppendEmojiPacks(
|
||||
[self updateImage];
|
||||
return;
|
||||
}
|
||||
base::ObservableViewer(
|
||||
document->session().downloaderTaskFinished()
|
||||
document->session().downloaderTaskFinished(
|
||||
) | rpl::start_with_next([=] {
|
||||
_image = _media->getStickerSmall();
|
||||
if (_image) {
|
||||
|
Reference in New Issue
Block a user