2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Show root as pinned when not visible as message.

This commit is contained in:
John Preston
2020-09-15 21:19:06 +03:00
parent 22dc7601f5
commit 7f928a92ea
5 changed files with 112 additions and 52 deletions

View File

@@ -29,6 +29,7 @@ struct RepliesList::Viewer {
MsgId around = 0;
int limitBefore = 0;
int limitAfter = 0;
base::has_weak_ptr guard;
};
RepliesList::RepliesList(not_null<History*> history, MsgId rootId)
@@ -80,12 +81,12 @@ rpl::producer<MessagesSlice> RepliesList::sourceFromServer(
) | rpl::filter([=](const MessageUpdate &update) {
return applyUpdate(viewer, update);
}) | rpl::start_with_next([=] {
crl::on_main(this, push);
crl::on_main(&viewer->guard, push);
}, lifetime);
_partLoaded.events(
) | rpl::start_with_next([=] {
crl::on_main(this, push);
crl::on_main(&viewer->guard, push);
}, lifetime);
push();