| 690 | } |
| 691 | |
| 692 | void MessageItem::ShiftUp(int amount) |
| 693 | { |
| 694 | // Shift all the rectangles up by [amount] pixels. |
| 695 | // Validation care has been taken to ensure this doesn't result in an illegal state. |
| 696 | ShiftUpRect(m_rect, amount); |
| 697 | ShiftUpRect(m_authorRect, amount); |
| 698 | ShiftUpRect(m_refAvatarRect, amount); |
| 699 | ShiftUpRect(m_refMsgRect, amount); |
| 700 | ShiftUpRect(m_messageRect, amount); |
| 701 | |
| 702 | for (auto& word : m_message.GetWords()) { |
| 703 | ShiftUpDRect(word.m_rect, amount); |
| 704 | } |
| 705 | |
| 706 | for (auto& att : m_attachmentData) { |
| 707 | ShiftUpRect(att.m_addRect, amount); |
| 708 | ShiftUpRect(att.m_boxRect, amount); |
| 709 | ShiftUpRect(att.m_textRect, amount); |
| 710 | } |
| 711 | |
| 712 | for (auto& itd : m_interactableData) { |
| 713 | ShiftUpDRect(itd.m_rect, amount); |
| 714 | } |
| 715 | |
| 716 | for (auto& emb : m_embedData) { |
| 717 | ShiftUpRect(emb.m_rect, amount); |
| 718 | ShiftUpRect(emb.m_imageRect, amount); |
| 719 | ShiftUpRect(emb.m_thumbnailRect, amount); |
| 720 | ShiftUpRect(emb.m_titleRect, amount); |
| 721 | ShiftUpRect(emb.m_authorRect, amount); |
| 722 | ShiftUpRect(emb.m_providerRect, amount); |
| 723 | } |
| 724 | |
| 725 | if (m_pMessagePollData) { |
| 726 | m_pMessagePollData->ShiftUp(amount); |
| 727 | } |
| 728 | } |
| 729 | |
| 730 | void MessageList::DeleteMessage(Snowflake sf) |
| 731 | { |
no test coverage detected