mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
@@ -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()));
|
||||
}
|
||||
|
Submodule Telegram/lib_rpl updated: 86b9b80fae...e1b96399d9
Reference in New Issue
Block a user