mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Version 5.2: Fix build with GCC.
This commit is contained in:
parent
7eb98b50ec
commit
707951accb
8 changed files with 1 additions and 22 deletions
|
@ -69,16 +69,6 @@ constexpr auto kTransactionsLimit = 100;
|
||||||
}, [](const auto &) {
|
}, [](const auto &) {
|
||||||
return PeerId(0);
|
return PeerId(0);
|
||||||
}).value;
|
}).value;
|
||||||
const auto isBot = [&] {
|
|
||||||
if (barePeerId) {
|
|
||||||
if (const auto p = peer->owner().peer(PeerId(barePeerId))) {
|
|
||||||
if (const auto u = p->asUser()) {
|
|
||||||
return u->isBot();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}();
|
|
||||||
return Data::CreditsHistoryEntry{
|
return Data::CreditsHistoryEntry{
|
||||||
.id = qs(tl.data().vid()),
|
.id = qs(tl.data().vid()),
|
||||||
.title = qs(tl.data().vtitle().value_or_empty()),
|
.title = qs(tl.data().vtitle().value_or_empty()),
|
||||||
|
|
|
@ -1586,7 +1586,6 @@ void Controller::fillBotBalanceButton() {
|
||||||
const auto icon = Ui::CreateChild<Ui::RpWidget>(button);
|
const auto icon = Ui::CreateChild<Ui::RpWidget>(button);
|
||||||
icon->resize(Size(st::menuIconLinks.width() - kSizeShift));
|
icon->resize(Size(st::menuIconLinks.width() - kSizeShift));
|
||||||
|
|
||||||
const auto bg = st::boxBg->c;
|
|
||||||
auto colorized = [&] {
|
auto colorized = [&] {
|
||||||
auto f = QFile(Ui::Premium::Svg());
|
auto f = QFile(Ui::Premium::Svg());
|
||||||
if (!f.open(QIODevice::ReadOnly)) {
|
if (!f.open(QIODevice::ReadOnly)) {
|
||||||
|
|
|
@ -116,7 +116,6 @@ void EditPriceBox(
|
||||||
not_null<Main::Session*> session,
|
not_null<Main::Session*> session,
|
||||||
uint64 price,
|
uint64 price,
|
||||||
Fn<void(uint64)> apply) {
|
Fn<void(uint64)> apply) {
|
||||||
const auto owner = &session->data();
|
|
||||||
box->setTitle(tr::lng_paid_title());
|
box->setTitle(tr::lng_paid_title());
|
||||||
AddSubsectionTitle(
|
AddSubsectionTitle(
|
||||||
box->verticalLayout(),
|
box->verticalLayout(),
|
||||||
|
@ -837,7 +836,6 @@ QImage SendFilesBox::preparePriceTagBg(QSize size) const {
|
||||||
bg = QImage(ratio, ratio, QImage::Format_ARGB32_Premultiplied);
|
bg = QImage(ratio, ratio, QImage::Format_ARGB32_Premultiplied);
|
||||||
bg.fill(Qt::black);
|
bg.fill(Qt::black);
|
||||||
}
|
}
|
||||||
const auto bgSize = bg.size() / bg.devicePixelRatio();
|
|
||||||
|
|
||||||
auto result = QImage(size * ratio, QImage::Format_ARGB32_Premultiplied);
|
auto result = QImage(size * ratio, QImage::Format_ARGB32_Premultiplied);
|
||||||
result.setDevicePixelRatio(ratio);
|
result.setDevicePixelRatio(ratio);
|
||||||
|
|
|
@ -2008,7 +2008,6 @@ ItemPreview MediaInvoice::toPreview(ToPreviewOptions options) const {
|
||||||
return Media::toPreview(options);
|
return Media::toPreview(options);
|
||||||
}
|
}
|
||||||
auto counts = AlbumCounts();
|
auto counts = AlbumCounts();
|
||||||
const auto item = parent();
|
|
||||||
auto images = std::vector<ItemPreviewImage>();
|
auto images = std::vector<ItemPreviewImage>();
|
||||||
auto context = std::vector<std::any>();
|
auto context = std::vector<std::any>();
|
||||||
const auto existing = options.existing;
|
const auto existing = options.existing;
|
||||||
|
|
|
@ -119,7 +119,6 @@ void InnerWidget::fill() {
|
||||||
const auto container = this;
|
const auto container = this;
|
||||||
const auto &data = _state;
|
const auto &data = _state;
|
||||||
const auto multiplier = data.usdRate * Data::kEarnMultiplier;
|
const auto multiplier = data.usdRate * Data::kEarnMultiplier;
|
||||||
const auto session = &_peer->session();
|
|
||||||
|
|
||||||
auto availableBalanceValue = rpl::single(
|
auto availableBalanceValue = rpl::single(
|
||||||
data.availableBalance
|
data.availableBalance
|
||||||
|
@ -192,7 +191,7 @@ void InnerWidget::fill() {
|
||||||
Ui::ToggleChildrenVisibility(line, true);
|
Ui::ToggleChildrenVisibility(line, true);
|
||||||
|
|
||||||
Ui::AddSkip(container);
|
Ui::AddSkip(container);
|
||||||
const auto sub = container->add(
|
container->add(
|
||||||
object_ptr<Ui::FlatLabel>(
|
object_ptr<Ui::FlatLabel>(
|
||||||
container,
|
container,
|
||||||
text(),
|
text(),
|
||||||
|
|
|
@ -281,10 +281,6 @@ void InnerWidget::load() {
|
||||||
rpl::lifetime apiPremiumBotLifetime;
|
rpl::lifetime apiPremiumBotLifetime;
|
||||||
};
|
};
|
||||||
const auto state = lifetime().make_state<State>(_peer);
|
const auto state = lifetime().make_state<State>(_peer);
|
||||||
const auto api = lifetime().make_state<Api::ChannelEarnStatistics>(
|
|
||||||
_peer->asChannel());
|
|
||||||
const auto apiCredits = lifetime().make_state<Api::CreditsEarnStatistics>(
|
|
||||||
_peer);
|
|
||||||
|
|
||||||
Info::Statistics::FillLoading(
|
Info::Statistics::FillLoading(
|
||||||
this,
|
this,
|
||||||
|
|
|
@ -612,7 +612,6 @@ WindowPosition MainWindow::nextInitialChildPosition(SeparateId childId) {
|
||||||
const auto adjust = [&](int value) {
|
const auto adjust = [&](int value) {
|
||||||
return (value * 3 / 4);
|
return (value * 3 / 4);
|
||||||
};
|
};
|
||||||
const auto secondaryWithChatsList = !childId.primary() && childId.hasChatsList();
|
|
||||||
const auto width = OptionNewWindowsSizeAsFirst.value()
|
const auto width = OptionNewWindowsSizeAsFirst.value()
|
||||||
? Core::App().settings().windowPosition().w
|
? Core::App().settings().windowPosition().w
|
||||||
: childId.primary()
|
: childId.primary()
|
||||||
|
|
|
@ -143,7 +143,6 @@ void Controller::showAccount(
|
||||||
MsgId singlePeerShowAtMsgId) {
|
MsgId singlePeerShowAtMsgId) {
|
||||||
Expects(isPrimary() || _id.account == account);
|
Expects(isPrimary() || _id.account == account);
|
||||||
|
|
||||||
const auto prevAccount = _id.account;
|
|
||||||
const auto prevSession = maybeSession();
|
const auto prevSession = maybeSession();
|
||||||
const auto prevSessionUniqueId = prevSession
|
const auto prevSessionUniqueId = prevSession
|
||||||
? prevSession->uniqueId()
|
? prevSession->uniqueId()
|
||||||
|
|
Loading…
Add table
Reference in a new issue