From e0d7cae3fe914b05938f127116326f26e3d45493 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 19 Mar 2019 19:57:16 +0400 Subject: [PATCH] Fix build for macOS. --- .../SourceFiles/boxes/peers/edit_peer_info_box.cpp | 10 ++++------ .../SourceFiles/boxes/peers/edit_peer_type_box.cpp | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index 944e7a254..673b4cca8 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -524,7 +524,7 @@ void Controller::fillPrivacyTypeButton() { }), [=] { showEditPeerTypeBox(); }); - _updadePrivacyType.fire(std::move(_privacySavedValue.value())); + _updadePrivacyType.fire_copy(*_privacySavedValue); } void Controller::fillInviteLinkButton() { @@ -553,7 +553,7 @@ void Controller::fillSignaturesButton() { AddButtonWithText( _controls.buttonsLayout, - std::move(Lang::Viewer(lng_edit_sign_messages)), + Lang::Viewer(lng_edit_sign_messages), rpl::single(QString()), [=] {} )->toggleOn(rpl::single(channel->addsSignature()) @@ -597,7 +597,7 @@ void Controller::fillHistoryVisibilityButton() { }; AddButtonWithText( container, - std::move(Lang::Viewer(lng_manage_history_visibility_title)), + Lang::Viewer(lng_manage_history_visibility_title), updateHistoryVisibility->events( ) | rpl::map([](HistoryVisibility flag) { return lang((HistoryVisibility::Visible == flag) @@ -606,9 +606,7 @@ void Controller::fillHistoryVisibilityButton() { }), buttonCallback); - updateHistoryVisibility->fire( - std::move(_historyVisibilitySavedValue.value()) - ); + updateHistoryVisibility->fire_copy(*_historyVisibilitySavedValue); //While appearing box we should use instant animation. refreshHistoryVisibility(true); diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp index 285fe802c..6e66c3d64 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_type_box.cpp @@ -726,7 +726,7 @@ void EditPeerTypeBox::prepare() { [=] { controller->setFocusUsername(); if (_usernameError.has_value()) { - controller->showError(_usernameError.value()); + controller->showError(*_usernameError); _usernameError = std::nullopt; } },