2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Migrated SendingInfoTo from using of end geometry to end point.

This commit is contained in:
23rd
2022-02-14 03:25:04 +03:00
committed by John Preston
parent 6939da2fd2
commit 0dc2e1a5ae
4 changed files with 18 additions and 15 deletions

View File

@@ -5394,7 +5394,7 @@ void HistoryWidget::startMessageSendingAnimation(
Assert(item->mainView() != nullptr);
Assert(item->mainView()->media() != nullptr);
auto globalEndGeometry = rpl::merge(
auto globalEndTopLeft = rpl::merge(
_scroll->innerResizes() | rpl::to_empty,
session().data().newItemAdded() | rpl::to_empty,
geometryValue() | rpl::to_empty,
@@ -5405,13 +5405,13 @@ void HistoryWidget::startMessageSendingAnimation(
const auto additional = (_list->height() == _scroll->height())
? view->height()
: 0;
return _list->mapToGlobal(view->innerGeometry().translated(
return _list->mapToGlobal(QPoint(
0,
_list->itemTop(view) - additional));
});
sendingAnimation.startAnimation({
.globalEndGeometry = std::move(globalEndGeometry),
.globalEndTopLeft = std::move(globalEndTopLeft),
.view = [=] { return item->mainView(); },
.paintContext = [=] { return _list->preparePaintContext({}); },
});