mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 03:42:56 +00:00
Use different indentation for rpl operators.
It works better with Visual Studio IDE.
This commit is contained in:
@@ -260,50 +260,46 @@ rpl::producer<SparseIdsSlice> SearchController::simpleIdsSlice(
|
||||
aroundId,
|
||||
limitBefore,
|
||||
limitAfter);
|
||||
builder->insufficientAround()
|
||||
| rpl::start_with_next([=](
|
||||
const SparseIdsSliceBuilder::AroundData &data) {
|
||||
requestMore(data, query, listData);
|
||||
}, lifetime);
|
||||
builder->insufficientAround(
|
||||
) | rpl::start_with_next([=](
|
||||
const SparseIdsSliceBuilder::AroundData &data) {
|
||||
requestMore(data, query, listData);
|
||||
}, lifetime);
|
||||
|
||||
auto pushNextSnapshot = [=] {
|
||||
consumer.put_next(builder->snapshot());
|
||||
};
|
||||
|
||||
listData->list.sliceUpdated()
|
||||
| rpl::filter([=](const SliceUpdate &update) {
|
||||
return builder->applyUpdate(update);
|
||||
})
|
||||
| rpl::start_with_next(pushNextSnapshot, lifetime);
|
||||
listData->list.sliceUpdated(
|
||||
) | rpl::filter([=](const SliceUpdate &update) {
|
||||
return builder->applyUpdate(update);
|
||||
}) | rpl::start_with_next(pushNextSnapshot, lifetime);
|
||||
|
||||
Auth().data().itemRemoved()
|
||||
| rpl::filter([=](not_null<const HistoryItem*> item) {
|
||||
return (item->history()->peer->id == peerId);
|
||||
})
|
||||
| rpl::filter([=](not_null<const HistoryItem*> item) {
|
||||
return builder->removeOne(item->id);
|
||||
})
|
||||
| rpl::start_with_next(pushNextSnapshot, lifetime);
|
||||
Auth().data().itemRemoved(
|
||||
) | rpl::filter([=](not_null<const HistoryItem*> item) {
|
||||
return (item->history()->peer->id == peerId);
|
||||
}) | rpl::filter([=](not_null<const HistoryItem*> item) {
|
||||
return builder->removeOne(item->id);
|
||||
}) | rpl::start_with_next(pushNextSnapshot, lifetime);
|
||||
|
||||
Auth().data().historyCleared()
|
||||
| rpl::filter([=](not_null<const History*> history) {
|
||||
return (history->peer->id == peerId);
|
||||
})
|
||||
| rpl::filter([=] { return builder->removeAll(); })
|
||||
| rpl::start_with_next(pushNextSnapshot, lifetime);
|
||||
Auth().data().historyCleared(
|
||||
) | rpl::filter([=](not_null<const History*> history) {
|
||||
return (history->peer->id == peerId);
|
||||
}) | rpl::filter([=] {
|
||||
return builder->removeAll();
|
||||
}) | rpl::start_with_next(pushNextSnapshot, lifetime);
|
||||
|
||||
using Result = Storage::SparseIdsListResult;
|
||||
listData->list.query(Storage::SparseIdsListQuery(
|
||||
aroundId,
|
||||
limitBefore,
|
||||
limitAfter))
|
||||
| rpl::filter([=](const Result &result) {
|
||||
return builder->applyInitial(result);
|
||||
})
|
||||
| rpl::start_with_next_done(
|
||||
pushNextSnapshot,
|
||||
[=] { builder->checkInsufficient(); },
|
||||
lifetime);
|
||||
limitAfter
|
||||
)) | rpl::filter([=](const Result &result) {
|
||||
return builder->applyInitial(result);
|
||||
}) | rpl::start_with_next_done(
|
||||
pushNextSnapshot,
|
||||
[=] { builder->checkInsufficient(); },
|
||||
lifetime);
|
||||
|
||||
return lifetime;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user