mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 20:03:12 +00:00
Update API scheme on layer 228.
This commit is contained in:
@@ -411,6 +411,7 @@ void Updates::channelDifferenceDone(
|
||||
channel->ptsInit(pts->v);
|
||||
}
|
||||
}, [&](const MTPDdialogFolder &) {
|
||||
}, [&](const MTPDdialogCommunity &) {
|
||||
});
|
||||
session().data().applyDialogs(
|
||||
nullptr,
|
||||
@@ -855,6 +856,8 @@ void Updates::channelRangeDifferenceDone(
|
||||
return data.vpts().value_or_empty();
|
||||
}, [&](const MTPDdialogFolder &data) {
|
||||
return 0;
|
||||
}, [&](const MTPDdialogCommunity &data) {
|
||||
return 0;
|
||||
});
|
||||
isFinal = d.is_final();
|
||||
} break;
|
||||
@@ -1826,6 +1829,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
|
||||
history->setUnreadMark(data.is_unread());
|
||||
}
|
||||
}, [](const MTPDdialogPeerFolder &dialog) {
|
||||
}, [](const MTPDdialogPeerCommunity &dialog) {
|
||||
});
|
||||
} break;
|
||||
|
||||
@@ -2344,6 +2348,12 @@ void Updates::feedUpdate(const MTPUpdate &update) {
|
||||
return true;
|
||||
}
|
||||
return !session().data().folderLoaded(data.vfolder_id().v);
|
||||
}, [&](const MTPDdialogPeerCommunity &data) {
|
||||
const auto channelId = ChannelId(data.vcommunity_id().v);
|
||||
const auto channel
|
||||
= session().data().channelLoaded(channelId);
|
||||
return !channel
|
||||
|| !session().data().historyLoaded(channel);
|
||||
});
|
||||
};
|
||||
if (!ranges::none_of(order, notLoaded)) {
|
||||
@@ -2394,6 +2404,17 @@ void Updates::feedUpdate(const MTPUpdate &update) {
|
||||
).arg(folderId
|
||||
));
|
||||
return false;
|
||||
}, [&](const MTPDdialogPeerCommunity &data) {
|
||||
const auto channelId = ChannelId(data.vcommunity_id().v);
|
||||
const auto channel = session().data().channelLoaded(channelId);
|
||||
if (channel) {
|
||||
if (const auto history
|
||||
= session().data().historyLoaded(channel)) {
|
||||
history->applyPinnedUpdate(d);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (!done) {
|
||||
session().api().requestPinnedDialogs(folder);
|
||||
|
||||
Reference in New Issue
Block a user