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

Paint nice stories userpics in chats list.

This commit is contained in:
John Preston
2023-05-22 19:59:16 +04:00
parent 2c5d990e1c
commit 1d27c8c940
11 changed files with 675 additions and 7 deletions

View File

@@ -149,6 +149,10 @@ bool Stories::allLoaded() const {
return _allLoaded;
}
rpl::producer<> Stories::allChanged() const {
return _allChanged.events();
}
// #TODO stories testing
StoryId Stories::generate(
not_null<HistoryItem*> item,
@@ -244,10 +248,14 @@ StoryId Stories::generate(
void Stories::pushToBack(StoriesList &&list) {
const auto i = ranges::find(_all, list.user, &StoriesList::user);
if (i != end(_all)) {
if (*i == list) {
return;
}
*i = std::move(list);
} else {
_all.push_back(std::move(list));
}
_allChanged.fire({});
}
void Stories::pushToFront(StoriesList &&list) {