mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-05-28 10:43:57 +02:00
45 lines
925 B
C++
45 lines
925 B
C++
/*
|
|
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
|
|
*/
|
|
#pragma once
|
|
|
|
#include "ui/userpic_view.h"
|
|
|
|
namespace Ui {
|
|
class RpWidget;
|
|
class FlatLabel;
|
|
} // namespace Ui
|
|
|
|
namespace Media::Stories {
|
|
|
|
class Controller;
|
|
|
|
struct HeaderData {
|
|
not_null<UserData*> user;
|
|
TimeId date = 0;
|
|
|
|
friend inline auto operator<=>(HeaderData, HeaderData) = default;
|
|
friend inline bool operator==(HeaderData, HeaderData) = default;
|
|
};
|
|
|
|
class Header final {
|
|
public:
|
|
explicit Header(not_null<Controller*> controller);
|
|
~Header();
|
|
|
|
void show(HeaderData data);
|
|
|
|
private:
|
|
const not_null<Controller*> _controller;
|
|
|
|
std::unique_ptr<Ui::RpWidget> _widget;
|
|
std::unique_ptr<Ui::FlatLabel> _date;
|
|
std::optional<HeaderData> _data;
|
|
|
|
};
|
|
|
|
} // namespace Media::Stories
|