2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Support pinned locally in filters.

This commit is contained in:
John Preston
2020-03-17 17:04:30 +04:00
parent 483d4e5a4e
commit e27a8fe058
30 changed files with 409 additions and 155 deletions

View File

@@ -362,16 +362,21 @@ public:
const QVector<MTPDialog> &dialogs,
std::optional<int> count = std::nullopt);
int pinnedChatsCount(Data::Folder *folder) const;
int pinnedChatsLimit(Data::Folder *folder) const;
int pinnedChatsCount(Data::Folder *folder, FilterId filterId) const;
int pinnedChatsLimit(Data::Folder *folder, FilterId filterId) const;
const std::vector<Dialogs::Key> &pinnedChatsOrder(
Data::Folder *folder) const;
void setChatPinned(const Dialogs::Key &key, bool pinned);
void clearPinnedChats(Data::Folder *folder);
Data::Folder *folder,
FilterId filterId) const;
void setChatPinned(
const Dialogs::Key &key,
FilterId filterId,
bool pinned);
void clearPinnedChats(Data::Folder *folder, FilterId filterId);
void applyPinnedChats(
Data::Folder *folder,
const QVector<MTPDialogPeer> &list);
void reorderTwoPinnedChats(
FilterId filterId,
const Dialogs::Key &key1,
const Dialogs::Key &key2);