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

Add ability to archive/unarchive the chats.

This commit is contained in:
John Preston
2019-04-18 12:28:43 +04:00
parent c58f097535
commit 854870683b
17 changed files with 210 additions and 129 deletions

View File

@@ -135,15 +135,19 @@ public:
const MTPSendMessageAction &action,
TimeId when);
[[nodiscard]] base::Variable<bool> &contactsLoaded() {
[[nodiscard]] rpl::variable<bool> &contactsLoaded() {
return _contactsLoaded;
}
[[nodiscard]] base::Variable<bool> &allChatsLoaded() {
return _allChatsLoaded;
[[nodiscard]] rpl::producer<Data::Folder*> chatsListChanges() const {
return _chatsListChanged.events();
}
[[nodiscard]] base::Observable<void> &moreChatsLoaded() {
return _moreChatsLoaded;
[[nodiscard]] bool chatsListLoaded(Data::Folder *folder = nullptr);
[[nodiscard]] rpl::producer<Data::Folder*> chatsListLoadedEvents() const {
return _chatsListLoadedEvents.events();
}
void chatsListChanged(FolderId folderId);
void chatsListChanged(Data::Folder *folder);
void chatsListDone(FolderId folderId);
struct ItemVisibilityQuery {
not_null<HistoryItem*> item;
@@ -725,9 +729,10 @@ private:
TimeId _exportAvailableAt = 0;
QPointer<BoxContent> _exportSuggestion;
base::Variable<bool> _contactsLoaded = { false };
base::Variable<bool> _allChatsLoaded = { false };
base::Observable<void> _moreChatsLoaded;
rpl::variable<bool> _contactsLoaded = false;
bool _chatsListLoaded = false;
rpl::event_stream<Data::Folder*> _chatsListLoadedEvents;
rpl::event_stream<Data::Folder*> _chatsListChanged;
base::Observable<ItemVisibilityQuery> _queryItemVisibility;
rpl::event_stream<IdChange> _itemIdChanges;
rpl::event_stream<not_null<const HistoryItem*>> _itemLayoutChanges;