diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_invite_link.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_invite_link.cpp index d8adfbc414..a9c92c745d 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_invite_link.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_invite_link.cpp @@ -522,9 +522,23 @@ not_null*> Controller::addRequestedListBlock( lt_count_decimal, std::move(requestedCount))); - const auto delegate = container->lifetime().make_state< - PeerListContentDelegateSimple - >(); + class Delegate final : public PeerListContentDelegateSimple { + public: + explicit Delegate(std::shared_ptr show) + : _show(std::move(show)) { + } + + std::shared_ptr peerListUiShow() override { + return _show; + } + + private: + const std::shared_ptr _show; + + }; + const auto delegate = container->lifetime().make_state( + this->delegate()->peerListUiShow()); + const auto controller = container->lifetime().make_state< Controller >(_peer, _data.current().admin, _data.value(), Role::Requested); diff --git a/Telegram/SourceFiles/boxes/share_box.cpp b/Telegram/SourceFiles/boxes/share_box.cpp index 2d081a5137..dff268c262 100644 --- a/Telegram/SourceFiles/boxes/share_box.cpp +++ b/Telegram/SourceFiles/boxes/share_box.cpp @@ -936,16 +936,18 @@ void ShareBox::Inner::loadProfilePhotos() { const auto from = std::max(yFrom / _rowHeight, 0); const auto to = std::max((yTo / _rowHeight) + 1, from); - const auto ffrom = from; const auto fto = std::min(to, int(_filtered.size())); + const auto ffrom = std::min(from, fto); for (auto i = ffrom; i != fto; ++i) { preloadUserpic(_filtered[i]->entry()); } - const auto ufrom = std::max(from - int(_filtered.size()), 0); const auto uto = std::min( to - int(_filtered.size()), int(d_byUsernameFiltered.size())); + const auto ufrom = std::min( + std::max(from - int(_filtered.size()), 0), + uto); for (auto i = ufrom; i != uto; ++i) { preloadUserpic(d_byUsernameFiltered[i]->history); } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 30b22ace0b..a2c2d92cda 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 30b22ace0b67f72e2ab913fccf56842b863effad +Subproject commit a2c2d92cda2cffdafeb671d1f292a2002fb54217