mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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();
|
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(
|
auto StickersListWidget::PrepareStickers(
|
||||||
const QVector<DocumentData*> &pack)
|
const QVector<DocumentData*> &pack)
|
||||||
-> std::vector<Sticker> {
|
-> std::vector<Sticker> {
|
||||||
|
|
|
@ -119,6 +119,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
class Footer;
|
class Footer;
|
||||||
struct Sticker;
|
struct Sticker;
|
||||||
|
struct Set;
|
||||||
|
|
||||||
enum class Section {
|
enum class Section {
|
||||||
Featured,
|
Featured,
|
||||||
|
@ -184,35 +185,6 @@ private:
|
||||||
int rowsBottom = 0;
|
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 {
|
struct FeaturedSet {
|
||||||
uint64 id = 0;
|
uint64 id = 0;
|
||||||
Data::StickersSetFlags flags;
|
Data::StickersSetFlags flags;
|
||||||
|
|
|
@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/text/format_values.h"
|
#include "ui/text/format_values.h"
|
||||||
#include "data/data_document.h"
|
#include "data/data_document.h"
|
||||||
#include "data/data_wall_paper.h"
|
#include "data/data_wall_paper.h"
|
||||||
|
#include "data/data_media_types.h"
|
||||||
#include "history/view/history_view_element.h"
|
#include "history/view/history_view_element.h"
|
||||||
#include "history/view/media/history_view_media_grouped.h"
|
#include "history/view/media/history_view_media_grouped.h"
|
||||||
#include "history/view/media/history_view_photo.h"
|
#include "history/view/media/history_view_photo.h"
|
||||||
|
@ -60,6 +61,13 @@ void PaintInterpolatedIcon(
|
||||||
p.restore();
|
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(
|
std::unique_ptr<Media> CreateAttach(
|
||||||
not_null<Element*> parent,
|
not_null<Element*> parent,
|
||||||
DocumentData *document,
|
DocumentData *document,
|
||||||
|
|
|
@ -31,12 +31,16 @@ void PaintInterpolatedIcon(
|
||||||
float64 b_ratio,
|
float64 b_ratio,
|
||||||
QRect rect);
|
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,
|
not_null<Element*> parent,
|
||||||
DocumentData *document,
|
DocumentData *document,
|
||||||
PhotoData *photo,
|
PhotoData *photo,
|
||||||
const std::vector<std::unique_ptr<Data::Media>> &collage = {},
|
const std::vector<std::unique_ptr<Data::Media>> &collage,
|
||||||
const QString &webpageUrl = QString());
|
const QString &webpageUrl);
|
||||||
int unitedLineHeight();
|
int unitedLineHeight();
|
||||||
|
|
||||||
[[nodiscard]] inline QSize NonEmptySize(QSize size) {
|
[[nodiscard]] inline QSize NonEmptySize(QSize size) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue