mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Beta version 4.2.1: Fix build with GCC.
This commit is contained in:
parent
2931e754c3
commit
8fc35e45e4
2 changed files with 2 additions and 12 deletions
|
@ -1295,7 +1295,6 @@ void Message::paintText(
|
|||
if (!hasVisibleText()) {
|
||||
return;
|
||||
}
|
||||
const auto item = message();
|
||||
const auto stm = context.messageStyle();
|
||||
p.setPen(stm->historyTextFg);
|
||||
p.setFont(st::msgFont);
|
||||
|
@ -2001,9 +2000,7 @@ void Message::updatePressed(QPoint point) {
|
|||
}
|
||||
|
||||
TextForMimeData Message::selectedText(TextSelection selection) const {
|
||||
const auto item = message();
|
||||
const auto media = this->media();
|
||||
|
||||
auto logEntryOriginalResult = TextForMimeData();
|
||||
auto textResult = text().toTextForMimeData(selection);
|
||||
auto skipped = skipTextSelection(selection);
|
||||
|
@ -2034,7 +2031,6 @@ TextForMimeData Message::selectedText(TextSelection selection) const {
|
|||
TextSelection Message::adjustSelection(
|
||||
TextSelection selection,
|
||||
TextSelectType type) const {
|
||||
const auto item = message();
|
||||
const auto media = this->media();
|
||||
|
||||
auto result = text().adjustSelection(selection, type);
|
||||
|
|
|
@ -417,9 +417,6 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
|||
return { newWidth, newHeight };
|
||||
}
|
||||
|
||||
const auto item = message();
|
||||
const auto media = this->media();
|
||||
|
||||
if (!text().isEmpty()) {
|
||||
auto contentWidth = newWidth;
|
||||
if (delegate()->elementIsChatWide()) {
|
||||
|
@ -435,7 +432,7 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
|||
? minHeight()
|
||||
: textHeightFor(nwidth);
|
||||
newHeight += st::msgServicePadding.top() + st::msgServicePadding.bottom() + st::msgServiceMargin.top() + st::msgServiceMargin.bottom();
|
||||
if (media) {
|
||||
if (const auto media = this->media()) {
|
||||
newHeight += st::msgServiceMargin.top() + media->resizeGetHeight(media->maxWidth());
|
||||
}
|
||||
}
|
||||
|
@ -444,13 +441,11 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
|||
}
|
||||
|
||||
QSize Service::performCountOptimalSize() {
|
||||
const auto item = message();
|
||||
const auto media = this->media();
|
||||
validateText();
|
||||
|
||||
auto maxWidth = text().maxWidth() + st::msgServicePadding.left() + st::msgServicePadding.right();
|
||||
auto minHeight = text().minHeight();
|
||||
if (media) {
|
||||
if (const auto media = this->media()) {
|
||||
media->initDimensions();
|
||||
}
|
||||
return { maxWidth, minHeight };
|
||||
|
@ -469,7 +464,6 @@ int Service::marginBottom() const {
|
|||
}
|
||||
|
||||
void Service::draw(Painter &p, const PaintContext &context) const {
|
||||
const auto item = message();
|
||||
auto g = countGeometry();
|
||||
if (g.width() < 1) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue