mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 06:37:24 +02:00
parent
784f10678c
commit
c6ef2b057e
3 changed files with 15 additions and 9 deletions
|
@ -1450,11 +1450,6 @@ void RepliesWidget::saveState(not_null<RepliesMemento*> memento) {
|
|||
void RepliesWidget::restoreState(not_null<RepliesMemento*> memento) {
|
||||
const auto setReplies = [&](std::shared_ptr<Data::RepliesList> replies) {
|
||||
_replies = std::move(replies);
|
||||
_replies->fullCount(
|
||||
) | rpl::take(1) | rpl::start_with_next([=] {
|
||||
_loaded = true;
|
||||
updatePinnedVisibility();
|
||||
}, lifetime());
|
||||
|
||||
rpl::combine(
|
||||
rpl::single(0) | rpl::then(_replies->fullCount()),
|
||||
|
@ -1663,7 +1658,18 @@ rpl::producer<Data::MessagesSlice> RepliesWidget::listSource(
|
|||
Data::MessagePosition aroundId,
|
||||
int limitBefore,
|
||||
int limitAfter) {
|
||||
return _replies->source(aroundId, limitBefore, limitAfter);
|
||||
return _replies->source(
|
||||
aroundId,
|
||||
limitBefore,
|
||||
limitAfter
|
||||
) | rpl::before_next([=] { // after_next makes a copy of value.
|
||||
if (!_loaded) {
|
||||
_loaded = true;
|
||||
crl::on_main(this, [=] {
|
||||
updatePinnedVisibility();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bool RepliesWidget::listAllowsMultiSelect() {
|
||||
|
|
|
@ -155,7 +155,7 @@ QSize Gif::countOptimalSize() {
|
|||
_thumbh = th;
|
||||
auto maxWidth = qMax(tw, st::minPhotoSize);
|
||||
auto minHeight = qMax(th, st::minPhotoSize);
|
||||
accumulate_max(maxWidth, _parent->infoWidth() + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||
accumulate_max(maxWidth, _parent->minWidthForMedia());
|
||||
if (!activeCurrentStreamed()) {
|
||||
accumulate_max(maxWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ QSize Gif::countCurrentSize(int newWidth) {
|
|||
|
||||
newWidth = qMax(tw, st::minPhotoSize);
|
||||
auto newHeight = qMax(th, st::minPhotoSize);
|
||||
accumulate_max(newWidth, _parent->infoWidth() + 2 * st::msgDateImgDelta + st::msgDateImgPadding.x());
|
||||
accumulate_max(newWidth, _parent->minWidthForMedia());
|
||||
if (!activeCurrentStreamed()) {
|
||||
accumulate_max(newWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 86b9b80fae7a41e7c6ad85f14659883533ab84e8
|
||||
Subproject commit e1b96399d9031c4ef0354631e6bb375029d29d9f
|
Loading…
Add table
Reference in a new issue