mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Version 5.7: Fix build with Xcode.
This commit is contained in:
parent
a75d7f0381
commit
8c3c8f888d
3 changed files with 8 additions and 6 deletions
|
@ -93,13 +93,15 @@ void LogPosition(const WindowPosition &position, const QString &name) {
|
||||||
[[nodiscard]] quint32 SerializeVideoQuality(Media::VideoQuality quality) {
|
[[nodiscard]] quint32 SerializeVideoQuality(Media::VideoQuality quality) {
|
||||||
static_assert(sizeof(Media::VideoQuality) == sizeof(uint32));
|
static_assert(sizeof(Media::VideoQuality) == sizeof(uint32));
|
||||||
auto result = uint32();
|
auto result = uint32();
|
||||||
memcpy(&result, &quality, sizeof(quality));
|
const auto data = static_cast<const void*>(&quality);
|
||||||
|
memcpy(&result, data, sizeof(quality));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] Media::VideoQuality DeserializeVideoQuality(quint32 value) {
|
[[nodiscard]] Media::VideoQuality DeserializeVideoQuality(quint32 value) {
|
||||||
auto result = Media::VideoQuality();
|
auto result = Media::VideoQuality();
|
||||||
memcpy(&result, &value, sizeof(result));
|
const auto data = static_cast<void*>(&result);
|
||||||
|
memcpy(data, &value, sizeof(result));
|
||||||
return (result.height <= 4320) ? result : Media::VideoQuality();
|
return (result.height <= 4320) ? result : Media::VideoQuality();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,7 @@ void InnerWidget::fill() {
|
||||||
);
|
);
|
||||||
|
|
||||||
auto creditsStateValue = bot
|
auto creditsStateValue = bot
|
||||||
? rpl::single(Data::CreditsEarnStatistics())
|
? rpl::single(Data::CreditsEarnStatistics()) | rpl::type_erased()
|
||||||
: rpl::single(creditsData) | rpl::then(
|
: rpl::single(creditsData) | rpl::then(
|
||||||
_stateUpdated.events(
|
_stateUpdated.events(
|
||||||
) | rpl::map([this] { return _state.creditsEarn; })
|
) | rpl::map([this] { return _state.creditsEarn; })
|
||||||
|
|
|
@ -83,7 +83,7 @@ public:
|
||||||
|
|
||||||
AbstractButton::setDisabled(true);
|
AbstractButton::setDisabled(true);
|
||||||
|
|
||||||
const auto processTooltip = [=, this](not_null<Ui::RpWidget*> w) {
|
const auto processTooltip = [=](not_null<Ui::RpWidget*> w) {
|
||||||
w->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
|
w->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||||
if (e->type() == QEvent::Enter) {
|
if (e->type() == QEvent::Enter) {
|
||||||
Ui::Tooltip::Show(1000, this);
|
Ui::Tooltip::Show(1000, this);
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
sizeValue(),
|
sizeValue(),
|
||||||
reset->sizeValue()
|
reset->sizeValue()
|
||||||
) | rpl::start_with_next([=, this](const QSize &size, const QSize &) {
|
) | rpl::start_with_next([=](const QSize &size, const QSize &) {
|
||||||
reset->setFullWidth(0
|
reset->setFullWidth(0
|
||||||
+ resetLabel->width()
|
+ resetLabel->width()
|
||||||
+ st::ivResetZoomInnerPadding);
|
+ st::ivResetZoomInnerPadding);
|
||||||
|
@ -658,7 +658,7 @@ void Controller::createWebview(const Webview::StorageId &storageId) {
|
||||||
_delegate->ivSetZoom(value);
|
_delegate->ivSetZoom(value);
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
_delegate->ivZoomValue(
|
_delegate->ivZoomValue(
|
||||||
) | rpl::start_with_next([=, this](int value) {
|
) | rpl::start_with_next([=](int value) {
|
||||||
webviewZoomController->setZoom(value);
|
webviewZoomController->setZoom(value);
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue