mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +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) {
|
||||
static_assert(sizeof(Media::VideoQuality) == sizeof(uint32));
|
||||
auto result = uint32();
|
||||
memcpy(&result, &quality, sizeof(quality));
|
||||
const auto data = static_cast<const void*>(&quality);
|
||||
memcpy(&result, data, sizeof(quality));
|
||||
return result;
|
||||
}
|
||||
|
||||
[[nodiscard]] Media::VideoQuality DeserializeVideoQuality(quint32 value) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ void InnerWidget::fill() {
|
|||
);
|
||||
|
||||
auto creditsStateValue = bot
|
||||
? rpl::single(Data::CreditsEarnStatistics())
|
||||
? rpl::single(Data::CreditsEarnStatistics()) | rpl::type_erased()
|
||||
: rpl::single(creditsData) | rpl::then(
|
||||
_stateUpdated.events(
|
||||
) | rpl::map([this] { return _state.creditsEarn; })
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
|
||||
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) {
|
||||
if (e->type() == QEvent::Enter) {
|
||||
Ui::Tooltip::Show(1000, this);
|
||||
|
@ -171,7 +171,7 @@ public:
|
|||
rpl::combine(
|
||||
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
|
||||
+ resetLabel->width()
|
||||
+ st::ivResetZoomInnerPadding);
|
||||
|
@ -658,7 +658,7 @@ void Controller::createWebview(const Webview::StorageId &storageId) {
|
|||
_delegate->ivSetZoom(value);
|
||||
}, lifetime());
|
||||
_delegate->ivZoomValue(
|
||||
) | rpl::start_with_next([=, this](int value) {
|
||||
) | rpl::start_with_next([=](int value) {
|
||||
webviewZoomController->setZoom(value);
|
||||
}, lifetime());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue