mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 06:37:24 +02:00
Fix build with VS 2022 17.1.
This commit is contained in:
parent
f5b8683b33
commit
c39f15bd71
4 changed files with 46 additions and 32 deletions
|
@ -234,6 +234,36 @@ struct StickersListWidget::Sticker {
|
|||
void ensureMediaCreated();
|
||||
};
|
||||
|
||||
struct StickersListWidget::Set {
|
||||
Set(
|
||||
uint64 id,
|
||||
Data::StickersSet *set,
|
||||
Data::StickersSetFlags flags,
|
||||
const QString &title,
|
||||
const QString &shortName,
|
||||
int count,
|
||||
bool externalLayout,
|
||||
std::vector<Sticker> &&stickers = {});
|
||||
Set(Set &&other);
|
||||
Set &operator=(Set &&other);
|
||||
~Set();
|
||||
|
||||
uint64 id = 0;
|
||||
Data::StickersSet *set = nullptr;
|
||||
Data::StickersSetFlags flags;
|
||||
QString title;
|
||||
QString shortName;
|
||||
std::vector<Sticker> stickers;
|
||||
std::unique_ptr<Ui::RippleAnimation> ripple;
|
||||
crl::time lastUpdateTime = 0;
|
||||
|
||||
std::unique_ptr<Lottie::MultiPlayer> lottiePlayer;
|
||||
rpl::lifetime lottieLifetime;
|
||||
|
||||
int count = 0;
|
||||
bool externalLayout = false;
|
||||
};
|
||||
|
||||
auto StickersListWidget::PrepareStickers(
|
||||
const QVector<DocumentData*> &pack)
|
||||
-> std::vector<Sticker> {
|
||||
|
|
|
@ -119,6 +119,7 @@ protected:
|
|||
private:
|
||||
class Footer;
|
||||
struct Sticker;
|
||||
struct Set;
|
||||
|
||||
enum class Section {
|
||||
Featured,
|
||||
|
@ -184,35 +185,6 @@ private:
|
|||
int rowsBottom = 0;
|
||||
};
|
||||
|
||||
struct Set {
|
||||
Set(
|
||||
uint64 id,
|
||||
Data::StickersSet *set,
|
||||
Data::StickersSetFlags flags,
|
||||
const QString &title,
|
||||
const QString &shortName,
|
||||
int count,
|
||||
bool externalLayout,
|
||||
std::vector<Sticker> &&stickers = {});
|
||||
Set(Set &&other);
|
||||
Set &operator=(Set &&other);
|
||||
~Set();
|
||||
|
||||
uint64 id = 0;
|
||||
Data::StickersSet *set = nullptr;
|
||||
Data::StickersSetFlags flags;
|
||||
QString title;
|
||||
QString shortName;
|
||||
std::vector<Sticker> stickers;
|
||||
std::unique_ptr<Ui::RippleAnimation> ripple;
|
||||
crl::time lastUpdateTime = 0;
|
||||
|
||||
std::unique_ptr<Lottie::MultiPlayer> lottiePlayer;
|
||||
rpl::lifetime lottieLifetime;
|
||||
|
||||
int count = 0;
|
||||
bool externalLayout = false;
|
||||
};
|
||||
struct FeaturedSet {
|
||||
uint64 id = 0;
|
||||
Data::StickersSetFlags flags;
|
||||
|
|
|
@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/text/format_values.h"
|
||||
#include "data/data_document.h"
|
||||
#include "data/data_wall_paper.h"
|
||||
#include "data/data_media_types.h"
|
||||
#include "history/view/history_view_element.h"
|
||||
#include "history/view/media/history_view_media_grouped.h"
|
||||
#include "history/view/media/history_view_photo.h"
|
||||
|
@ -60,6 +61,13 @@ void PaintInterpolatedIcon(
|
|||
p.restore();
|
||||
}
|
||||
|
||||
std::unique_ptr<Media> CreateAttach(
|
||||
not_null<Element*> parent,
|
||||
DocumentData *document,
|
||||
PhotoData *photo) {
|
||||
return CreateAttach(parent, document, photo, {}, {});
|
||||
}
|
||||
|
||||
std::unique_ptr<Media> CreateAttach(
|
||||
not_null<Element*> parent,
|
||||
DocumentData *document,
|
||||
|
|
|
@ -31,12 +31,16 @@ void PaintInterpolatedIcon(
|
|||
float64 b_ratio,
|
||||
QRect rect);
|
||||
|
||||
std::unique_ptr<Media> CreateAttach(
|
||||
[[nodiscard]] std::unique_ptr<Media> CreateAttach(
|
||||
not_null<Element*> parent,
|
||||
DocumentData *document,
|
||||
PhotoData *photo);
|
||||
[[nodiscard]] std::unique_ptr<Media> CreateAttach(
|
||||
not_null<Element*> parent,
|
||||
DocumentData *document,
|
||||
PhotoData *photo,
|
||||
const std::vector<std::unique_ptr<Data::Media>> &collage = {},
|
||||
const QString &webpageUrl = QString());
|
||||
const std::vector<std::unique_ptr<Data::Media>> &collage,
|
||||
const QString &webpageUrl);
|
||||
int unitedLineHeight();
|
||||
|
||||
[[nodiscard]] inline QSize NonEmptySize(QSize size) {
|
||||
|
|
Loading…
Add table
Reference in a new issue