mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Get rid of deprecated ranges::view usage
This commit is contained in:
@@ -362,9 +362,9 @@ Data::MessagesSlice ScheduledMessages::list(not_null<History*> history) {
|
||||
const auto &list = i->second.items;
|
||||
result.skippedAfter = result.skippedBefore = 0;
|
||||
result.fullCount = int(list.size());
|
||||
result.ids = ranges::view::all(
|
||||
result.ids = ranges::views::all(
|
||||
list
|
||||
) | ranges::view::transform(
|
||||
) | ranges::views::transform(
|
||||
&HistoryItem::fullId
|
||||
) | ranges::to_vector;
|
||||
return result;
|
||||
@@ -534,11 +534,11 @@ int32 ScheduledMessages::countListHash(const List &list) const {
|
||||
using namespace Api;
|
||||
|
||||
auto hash = HashInit();
|
||||
auto &&serverside = ranges::view::all(
|
||||
auto &&serverside = ranges::views::all(
|
||||
list.items
|
||||
) | ranges::view::filter([](const OwnedItem &item) {
|
||||
) | ranges::views::filter([](const OwnedItem &item) {
|
||||
return !item->isSending() && !item->hasFailed();
|
||||
}) | ranges::view::reverse;
|
||||
}) | ranges::views::reverse;
|
||||
for (const auto &item : serverside) {
|
||||
const auto j = list.idByItem.find(item.get());
|
||||
HashUpdate(hash, j->second);
|
||||
|
Reference in New Issue
Block a user