mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fixed updating of left userpic with offset from swipe-on-reply.
This commit is contained in:
@@ -1235,10 +1235,19 @@ void HistoryInner::paintEvent(QPaintEvent *e) {
|
||||
// paint the userpic if it intersects the painted rect
|
||||
if (userpicTop + st::msgPhotoSize > clip.top()) {
|
||||
const auto item = view->data();
|
||||
const auto hasTranslation = _gestureHorizontal.translation
|
||||
&& (_gestureHorizontal.msgBareId == item->fullId().msg.bare);
|
||||
const auto hasTranslation = context.gestureHorizontal.translation
|
||||
&& (context.gestureHorizontal.msgBareId
|
||||
== item->fullId().msg.bare);
|
||||
if (hasTranslation) {
|
||||
p.translate(_gestureHorizontal.translation, 0);
|
||||
p.translate(context.gestureHorizontal.translation, 0);
|
||||
update(
|
||||
QRect(
|
||||
st::historyPhotoLeft
|
||||
+ context.gestureHorizontal.translation,
|
||||
userpicTop,
|
||||
st::msgPhotoSize
|
||||
- context.gestureHorizontal.translation,
|
||||
st::msgPhotoSize));
|
||||
}
|
||||
if (const auto from = item->displayFrom()) {
|
||||
Dialogs::Ui::PaintUserpic(
|
||||
|
||||
@@ -2306,9 +2306,18 @@ void ListWidget::paintUserpics(
|
||||
if (userpicTop + st::msgPhotoSize > clip.top()) {
|
||||
const auto item = view->data();
|
||||
const auto hasTranslation = context.gestureHorizontal.translation
|
||||
&& (context.gestureHorizontal.msgBareId == item->fullId().msg.bare);
|
||||
&& (context.gestureHorizontal.msgBareId
|
||||
== item->fullId().msg.bare);
|
||||
if (hasTranslation) {
|
||||
p.translate(context.gestureHorizontal.translation, 0);
|
||||
update(
|
||||
QRect(
|
||||
st::historyPhotoLeft
|
||||
+ context.gestureHorizontal.translation,
|
||||
userpicTop,
|
||||
st::msgPhotoSize
|
||||
- context.gestureHorizontal.translation,
|
||||
st::msgPhotoSize));
|
||||
}
|
||||
if (const auto from = item->displayFrom()) {
|
||||
from->paintUserpicLeft(
|
||||
|
||||
Reference in New Issue
Block a user