mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Move recent emoji and variants to common settings.
Fixes #16163, fixes #4018, partially fixes #10123.
This commit is contained in:
@@ -8,7 +8,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#include "ui/style/style_core.h"
|
||||
#include "emoji.h"
|
||||
|
||||
#define DeclareReadSetting(Type, Name) extern Type g##Name; \
|
||||
inline const Type &c##Name() { \
|
||||
@@ -84,16 +83,6 @@ DeclareSetting(int, ScreenScale);
|
||||
DeclareSetting(int, ConfigScale);
|
||||
DeclareSetting(QString, TimeFormat);
|
||||
|
||||
using RecentEmojiPreloadOldOld = QVector<QPair<uint32, ushort>>;
|
||||
using RecentEmojiPreloadOld = QVector<QPair<uint64, ushort>>;
|
||||
using RecentEmojiPreload = QVector<QPair<QString, ushort>>;
|
||||
using RecentEmojiPack = QVector<QPair<EmojiPtr, ushort>>;
|
||||
using EmojiColorVariantsOld = QMap<uint32, uint64>;
|
||||
using EmojiColorVariants = QMap<QString, int>;
|
||||
DeclareRefSetting(RecentEmojiPack, RecentEmoji);
|
||||
DeclareSetting(RecentEmojiPreload, RecentEmojiPreload);
|
||||
DeclareRefSetting(EmojiColorVariants, EmojiVariants);
|
||||
|
||||
class DocumentData;
|
||||
|
||||
typedef QList<QPair<DocumentData*, int16>> RecentStickerPackOld;
|
||||
@@ -124,11 +113,6 @@ inline void cChangeTimeFormat(const QString &newFormat) {
|
||||
if (!newFormat.isEmpty()) cSetTimeFormat(newFormat);
|
||||
}
|
||||
|
||||
RecentEmojiPack &GetRecentEmoji();
|
||||
QVector<EmojiPtr> GetRecentEmojiSection();
|
||||
void AddRecentEmoji(EmojiPtr emoji);
|
||||
[[nodiscard]] rpl::producer<> UpdatedRecentEmoji();
|
||||
|
||||
inline bool passcodeCanTry() {
|
||||
if (cPasscodeBadTries() < 3) return true;
|
||||
auto dt = crl::now() - cPasscodeLastTry();
|
||||
|
Reference in New Issue
Block a user