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

Extract SparseIdsList module from SharedMedia.

This way it can be reused in search results management.
This commit is contained in:
John Preston
2017-10-29 19:32:01 +04:00
parent 15cc4502b4
commit a27edcad1c
19 changed files with 1254 additions and 1070 deletions

View File

@@ -172,14 +172,15 @@ rpl::producer<int> SharedMediaCountValue(
auto aroundId = 0;
auto limit = 0;
auto updated = SharedMediaMergedViewer(
SharedMediaMergedSlice::Key(
real->id,
migrated ? migrated->id : 0,
type,
aroundId),
SharedMediaMergedKey(
SparseIdsMergedSlice::Key(
real->id,
migrated ? migrated->id : 0,
aroundId),
type),
limit,
limit)
| rpl::map([](const SharedMediaMergedSlice &slice) {
| rpl::map([](const SparseIdsMergedSlice &slice) {
return slice.fullCount();
})
| rpl::filter_optional();