mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fix build and crash in Xcode.
This commit is contained in:
@@ -204,7 +204,7 @@ void InnerWidget::saveState(not_null<Memento*> memento) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InnerWidget::restoreState(not_null<Memento*> memento) {
|
void InnerWidget::restoreState(not_null<Memento*> memento) {
|
||||||
_listController->restoreState(std::move(memento->listState()));
|
_listController->restoreState(memento->listState());
|
||||||
}
|
}
|
||||||
|
|
||||||
int InnerWidget::desiredHeight() const {
|
int InnerWidget::desiredHeight() const {
|
||||||
|
@@ -56,11 +56,6 @@ void SectionWidget::init() {
|
|||||||
}, _content->lifetime());
|
}, _content->lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
not_null<Controller*> SectionWidget::controller() const {
|
|
||||||
Expects(_content != nullptr);
|
|
||||||
return _content->controller();
|
|
||||||
}
|
|
||||||
|
|
||||||
PeerData *SectionWidget::peerForDialogs() const {
|
PeerData *SectionWidget::peerForDialogs() const {
|
||||||
return _content->peerForDialogs();
|
return _content->peerForDialogs();
|
||||||
}
|
}
|
||||||
@@ -94,13 +89,13 @@ std::unique_ptr<Window::SectionMemento> SectionWidget::createMemento() {
|
|||||||
|
|
||||||
object_ptr<Window::LayerWidget> SectionWidget::moveContentToLayer(
|
object_ptr<Window::LayerWidget> SectionWidget::moveContentToLayer(
|
||||||
QRect bodyGeometry) {
|
QRect bodyGeometry) {
|
||||||
if (controller()->wrap() != Wrap::Narrow
|
if (_content->controller()->wrap() != Wrap::Narrow
|
||||||
|| width() < LayerWidget::MinimalSupportedWidth()) {
|
|| width() < LayerWidget::MinimalSupportedWidth()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return MoveMemento(
|
return MoveMemento(
|
||||||
std::move(_content)).createLayer(
|
std::move(_content)).createLayer(
|
||||||
controller()->window(),
|
controller(),
|
||||||
bodyGeometry);
|
bodyGeometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -73,8 +73,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
not_null<Controller*> controller() const;
|
|
||||||
|
|
||||||
object_ptr<WrapWidget> _content;
|
object_ptr<WrapWidget> _content;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user