2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Load all archive after the main list for filters.

This commit is contained in:
John Preston
2020-03-18 18:37:04 +04:00
parent ad8b0387f3
commit dc49f7e6dc
4 changed files with 39 additions and 6 deletions

View File

@@ -439,6 +439,15 @@ const ChatFilter &ChatFilters::applyUpdatedPinned(
return *i;
}
bool ChatFilters::archiveNeeded() const {
for (const auto &filter : _list) {
if (!(filter.flags() & ChatFilter::Flag::NoArchived)) {
return true;
}
}
return false;
}
const std::vector<ChatFilter> &ChatFilters::list() const {
return _list;
}

View File

@@ -103,6 +103,8 @@ public:
FilterId id,
const std::vector<Dialogs::Key> &dialogs);
[[nodiscard]] bool archiveNeeded() const;
private:
void load(bool force);
bool applyOrder(const QVector<MTPint> &order);