Fix build for macOS.

This commit is contained in:
John Preston 2019-03-19 19:57:16 +04:00
parent 241526f127
commit e0d7cae3fe
2 changed files with 5 additions and 7 deletions

View File

@ -524,7 +524,7 @@ void Controller::fillPrivacyTypeButton() {
}), }),
[=] { showEditPeerTypeBox(); }); [=] { showEditPeerTypeBox(); });
_updadePrivacyType.fire(std::move(_privacySavedValue.value())); _updadePrivacyType.fire_copy(*_privacySavedValue);
} }
void Controller::fillInviteLinkButton() { void Controller::fillInviteLinkButton() {
@ -553,7 +553,7 @@ void Controller::fillSignaturesButton() {
AddButtonWithText( AddButtonWithText(
_controls.buttonsLayout, _controls.buttonsLayout,
std::move(Lang::Viewer(lng_edit_sign_messages)), Lang::Viewer(lng_edit_sign_messages),
rpl::single(QString()), rpl::single(QString()),
[=] {} [=] {}
)->toggleOn(rpl::single(channel->addsSignature()) )->toggleOn(rpl::single(channel->addsSignature())
@ -597,7 +597,7 @@ void Controller::fillHistoryVisibilityButton() {
}; };
AddButtonWithText( AddButtonWithText(
container, container,
std::move(Lang::Viewer(lng_manage_history_visibility_title)), Lang::Viewer(lng_manage_history_visibility_title),
updateHistoryVisibility->events( updateHistoryVisibility->events(
) | rpl::map([](HistoryVisibility flag) { ) | rpl::map([](HistoryVisibility flag) {
return lang((HistoryVisibility::Visible == flag) return lang((HistoryVisibility::Visible == flag)
@ -606,9 +606,7 @@ void Controller::fillHistoryVisibilityButton() {
}), }),
buttonCallback); buttonCallback);
updateHistoryVisibility->fire( updateHistoryVisibility->fire_copy(*_historyVisibilitySavedValue);
std::move(_historyVisibilitySavedValue.value())
);
//While appearing box we should use instant animation. //While appearing box we should use instant animation.
refreshHistoryVisibility(true); refreshHistoryVisibility(true);

View File

@ -726,7 +726,7 @@ void EditPeerTypeBox::prepare() {
[=] { [=] {
controller->setFocusUsername(); controller->setFocusUsername();
if (_usernameError.has_value()) { if (_usernameError.has_value()) {
controller->showError(_usernameError.value()); controller->showError(*_usernameError);
_usernameError = std::nullopt; _usernameError = std::nullopt;
} }
}, },