2023-05-03 22:30:37 +04:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#include "media/stories/media_stories_view.h"
|
|
|
|
|
2023-05-05 14:40:51 +04:00
|
|
|
#include "media/stories/media_stories_controller.h"
|
2023-05-03 22:30:37 +04:00
|
|
|
#include "media/stories/media_stories_delegate.h"
|
|
|
|
#include "media/stories/media_stories_header.h"
|
|
|
|
#include "media/stories/media_stories_slider.h"
|
|
|
|
#include "media/stories/media_stories_reply.h"
|
|
|
|
|
|
|
|
namespace Media::Stories {
|
|
|
|
|
|
|
|
View::View(not_null<Delegate*> delegate)
|
2023-05-05 14:40:51 +04:00
|
|
|
: _controller(std::make_unique<Controller>(delegate)) {
|
2023-05-03 22:30:37 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
View::~View() = default;
|
|
|
|
|
|
|
|
void View::show(const Data::StoriesList &list, int index) {
|
2023-05-05 14:40:51 +04:00
|
|
|
_controller->show(list, index);
|
|
|
|
}
|
2023-05-03 22:30:37 +04:00
|
|
|
|
2023-05-05 14:40:51 +04:00
|
|
|
QRect View::contentGeometry() const {
|
|
|
|
return _controller->layout().content;
|
2023-05-03 22:30:37 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Media::Stories
|