mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Version 4.11: Fix build with GCC.
This commit is contained in:
parent
c46b659aa5
commit
1a503e5f1d
9 changed files with 0 additions and 51 deletions
Telegram/SourceFiles
|
@ -376,12 +376,9 @@ void PreviewWrap::paintEvent(QPaintEvent *e) {
|
|||
_element->draw(p, context);
|
||||
|
||||
if (_element->displayFromPhoto()) {
|
||||
auto userpicMinBottomSkip = st::historyPaddingBottom
|
||||
+ st::msgMargin.bottom();
|
||||
auto userpicBottom = height()
|
||||
- _element->marginBottom()
|
||||
- _element->marginTop();
|
||||
const auto item = _element->data();
|
||||
const auto userpicTop = userpicBottom - st::msgPhotoSize;
|
||||
_peer->paintUserpicLeft(
|
||||
p,
|
||||
|
@ -631,15 +628,12 @@ int ColorSelector::resizeGetHeight(int newWidth) {
|
|||
}
|
||||
const auto count = int(_samples.size());
|
||||
const auto columns = Ui::kSimpleColorIndexCount;
|
||||
const auto rows = (count + columns - 1) / columns;
|
||||
const auto skip = st::settingsColorRadioSkip;
|
||||
const auto size = (newWidth - skip * (columns - 1)) / float64(columns);
|
||||
const auto isize = int(base::SafeRound(size));
|
||||
auto top = 0;
|
||||
auto left = 0.;
|
||||
for (auto i = 0; i != count; ++i) {
|
||||
const auto row = i / columns;
|
||||
const auto column = i % columns;
|
||||
_samples[i]->resize(isize, isize);
|
||||
_samples[i]->move(int(base::SafeRound(left)), top);
|
||||
left += size + skip;
|
||||
|
|
|
@ -4474,8 +4474,6 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
|
|||
auto prepareGiftCode = [&](const MTPDmessageActionGiftCode &action) {
|
||||
auto result = PreparedServiceText();
|
||||
_history->session().giftBoxStickersPacks().load();
|
||||
const auto months = action.vmonths().v;
|
||||
|
||||
result.text = {
|
||||
(action.is_unclaimed()
|
||||
? tr::lng_prize_unclaimed_about
|
||||
|
|
|
@ -103,22 +103,6 @@ using SetHistoryArgs = ComposeControls::SetHistoryArgs;
|
|||
using VoiceRecordBar = Controls::VoiceRecordBar;
|
||||
using ForwardPanel = Controls::ForwardPanel;
|
||||
|
||||
[[nodiscard]] auto ShowWebPagePreview(WebPageData *page) {
|
||||
return page && !page->failed;
|
||||
}
|
||||
|
||||
WebPageText ProcessWebPageData(WebPageData *page) {
|
||||
auto previewText = HistoryView::TitleAndDescriptionFromWebPage(page);
|
||||
if (previewText.title.isEmpty()) {
|
||||
if (page->document) {
|
||||
previewText.title = tr::lng_attach_file(tr::now);
|
||||
} else if (page->photo) {
|
||||
previewText.title = tr::lng_attach_photo(tr::now);
|
||||
}
|
||||
}
|
||||
return previewText;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
class FieldHeader final : public Ui::RpWidget {
|
||||
|
@ -428,17 +412,6 @@ void FieldHeader::setShownMessage(HistoryItem *item) {
|
|||
_shownMessage = item;
|
||||
if (item) {
|
||||
updateShownMessageText();
|
||||
//if (item->fullId() == _editMsgId.current()) {
|
||||
// _preview = {};
|
||||
// if (const auto media = item->media()) {
|
||||
// if (const auto page = media->webpage()) {
|
||||
// const auto preview = ProcessWebPageData(page);
|
||||
// _title = preview.title;
|
||||
// _description = preview.description;
|
||||
// _preview.data = page;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
} else {
|
||||
_shownMessageText.clear();
|
||||
resolveMessageData();
|
||||
|
|
|
@ -357,8 +357,6 @@ void PreviewWrap::paintEvent(QPaintEvent *e) {
|
|||
_element->draw(p, context);
|
||||
|
||||
if (_element->displayFromPhoto()) {
|
||||
auto userpicMinBottomSkip = st::historyPaddingBottom
|
||||
+ st::msgMargin.bottom();
|
||||
auto userpicBottom = height()
|
||||
- _element->marginBottom()
|
||||
- _element->marginTop();
|
||||
|
|
|
@ -610,7 +610,6 @@ bool AddReplyToMessageAction(
|
|||
? tr::lng_context_reply_msg(tr::now)
|
||||
: tr::lng_context_quote_and_reply(tr::now);
|
||||
text.replace('&', u"&&"_q);
|
||||
const auto owner = &item->history()->owner();
|
||||
const auto itemId = item->fullId();
|
||||
menu->addAction(text, [=] {
|
||||
if (!item) {
|
||||
|
|
|
@ -1386,7 +1386,6 @@ void Message::paintFromName(
|
|||
const auto from = item->displayFrom();
|
||||
const auto info = from ? nullptr : item->hiddenSenderInfo();
|
||||
Assert(from || info);
|
||||
const auto st = context.st;
|
||||
const auto nameFg = !context.outbg
|
||||
? FromNameFg(context, colorIndex())
|
||||
: stm->msgServiceFg->c;
|
||||
|
@ -2683,7 +2682,6 @@ TextWithEntities Message::selectedQuote(
|
|||
return {};
|
||||
}
|
||||
auto modified = selection;
|
||||
const auto &modifications = text.modifications();
|
||||
for (const auto &modification : text.modifications()) {
|
||||
if (modification.position >= selection.to) {
|
||||
break;
|
||||
|
@ -2777,7 +2775,6 @@ TextSelection Message::selectionFromQuote(
|
|||
}
|
||||
offset = i + 1;
|
||||
}
|
||||
const auto &modifications = text.modifications();
|
||||
//for (const auto &modification : text.modifications()) {
|
||||
// if (modification.position >= selection.to) {
|
||||
// break;
|
||||
|
|
|
@ -251,12 +251,8 @@ QSize Giveaway::countCurrentSize(int newWidth) {
|
|||
void Giveaway::draw(Painter &p, const PaintContext &context) const {
|
||||
if (width() < st::msgPadding.left() + st::msgPadding.right() + 1) return;
|
||||
|
||||
const auto st = context.st;
|
||||
const auto sti = context.imageStyle();
|
||||
const auto stm = context.messageStyle();
|
||||
|
||||
auto &semibold = stm->msgServiceFg;
|
||||
|
||||
auto padding = inBubblePadding();
|
||||
|
||||
const auto outer = width();
|
||||
|
@ -343,7 +339,6 @@ void Giveaway::paintChannels(
|
|||
}
|
||||
|
||||
const auto size = _channels[0].geometry.height();
|
||||
const auto ratio = style::DevicePixelRatio();
|
||||
const auto st = context.st;
|
||||
const auto stm = context.messageStyle();
|
||||
const auto selected = context.selected();
|
||||
|
@ -491,8 +486,6 @@ void Giveaway::clickHandlerPressedChanged(
|
|||
}
|
||||
if (pressed) {
|
||||
if (!channel.ripple) {
|
||||
const auto full = QRect(0, 0, width(), height());
|
||||
const auto outer = full.marginsRemoved(inBubblePadding());
|
||||
const auto owner = &parent()->history()->owner();
|
||||
channel.ripple = std::make_unique<Ui::RippleAnimation>(
|
||||
st::defaultRippleAnimation,
|
||||
|
|
|
@ -260,8 +260,6 @@ void AskBoostBox(
|
|||
box->setWidth(st::boxWideWidth);
|
||||
box->setStyle(st::boostBox);
|
||||
|
||||
const auto full = !data.boost.nextLevelBoosts;
|
||||
|
||||
struct State {
|
||||
rpl::variable<bool> you = false;
|
||||
bool submitted = false;
|
||||
|
|
|
@ -685,7 +685,6 @@ void SessionNavigation::applyBoost(
|
|||
done(false);
|
||||
return;
|
||||
}
|
||||
auto already = false;
|
||||
auto different = PeerId();
|
||||
auto earliest = TimeId(-1);
|
||||
const auto now = base::unixtime::now();
|
||||
|
|
Loading…
Add table
Reference in a new issue