| 398 | |
| 399 | template <typename PaintItemCallback> |
| 400 | void PaintRow( |
| 401 | Painter &p, |
| 402 | not_null<const BasicRow*> row, |
| 403 | QRect geometry, |
| 404 | not_null<Entry*> entry, |
| 405 | VideoUserpic *videoUserpic, |
| 406 | PeerData *from, |
| 407 | PeerBadge &rowBadge, |
| 408 | Fn<void()> customEmojiRepaint, |
| 409 | const Text::String &rowName, |
| 410 | const HiddenSenderInfo *hiddenSenderInfo, |
| 411 | HistoryItem *item, |
| 412 | const Data::Draft *draft, |
| 413 | TimeId date, |
| 414 | const PaintContext &context, |
| 415 | const FakeRow *fakeRow, |
| 416 | BadgesState badgesState, |
| 417 | base::flags<Flag> flags, |
| 418 | PaintItemCallback &&paintItemCallback) { |
| 419 | const auto supportMode = entry->session().supportMode(); |
| 420 | if (supportMode) { |
| 421 | draft = nullptr; |
| 422 | } |
| 423 | |
| 424 | const auto history = entry->asHistory(); |
| 425 | const auto thread = entry->asThread(); |
| 426 | const auto sublist = entry->asSublist(); |
| 427 | |
| 428 | auto bg = context.active |
| 429 | ? st::dialogsBgActive |
| 430 | : context.selected |
| 431 | ? st::dialogsBgOver |
| 432 | : context.currentBg; |
| 433 | auto swipeTranslation = 0; |
| 434 | if (history |
| 435 | && context.quickActionContext |
| 436 | && !context.quickActionContext->ripple |
| 437 | && (history->peer->id.value |
| 438 | == context.quickActionContext->data.msgBareId)) { |
| 439 | if (context.quickActionContext->data.translation != 0) { |
| 440 | swipeTranslation = context.quickActionContext->data.translation |
| 441 | * -2; |
| 442 | } |
| 443 | } |
| 444 | if (swipeTranslation) { |
| 445 | p.translate(-swipeTranslation, 0); |
| 446 | } |
| 447 | p.fillRect(geometry, bg); |
| 448 | if (!(flags & Flag::TopicJumpRipple)) { |
| 449 | auto ripple = context.active |
| 450 | ? st::dialogsRippleBgActive |
| 451 | : st::dialogsRippleBg; |
| 452 | row->paintRipple(p, 0, 0, context.width, &ripple->c); |
| 453 | } |
| 454 | |
| 455 | if (flags & Flag::SavedMessages) { |
| 456 | EmptyUserpic::PaintSavedMessages( |
| 457 | p, |
no test coverage detected