mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
More correct way of applying min stories.
This commit is contained in:
parent
0f8d9e885a
commit
98ab91a56a
1 changed files with 15 additions and 13 deletions
|
@ -469,7 +469,9 @@ void Story::applyFields(
|
|||
bool initial) {
|
||||
_lastUpdateTime = now;
|
||||
|
||||
const auto reaction = data.vsent_reaction()
|
||||
const auto reaction = data.is_min()
|
||||
? _sentReactionId
|
||||
: data.vsent_reaction()
|
||||
? Data::ReactionFromMTP(*data.vsent_reaction())
|
||||
: Data::ReactionId();
|
||||
const auto pinned = data.is_pinned();
|
||||
|
@ -493,7 +495,6 @@ void Story::applyFields(
|
|||
auto views = _views.total;
|
||||
auto reactions = _views.reactions;
|
||||
auto viewers = std::vector<not_null<PeerData*>>();
|
||||
if (!data.is_min()) {
|
||||
if (const auto info = data.vviews()) {
|
||||
views = info->data().vviews_count().v;
|
||||
reactions = info->data().vreactions_count().v;
|
||||
|
@ -506,7 +507,8 @@ void Story::applyFields(
|
|||
viewers.push_back(owner.peer(peerFromUser(id)));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
viewers = _recentViewers;
|
||||
}
|
||||
auto locations = std::vector<StoryLocation>();
|
||||
if (const auto areas = data.vmedia_areas()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue