mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Remove changelog stories on archive attempt.
This commit is contained in:
parent
4df7761e9d
commit
eaa491518e
1 changed files with 9 additions and 1 deletions
|
@ -1170,8 +1170,11 @@ void Stories::toggleHidden(
|
|||
bool hidden,
|
||||
std::shared_ptr<Ui::Show> show) {
|
||||
const auto peer = _owner->peer(peerId);
|
||||
const auto justRemove = peer->isServiceUser() && hidden;
|
||||
if (peer->hasStoriesHidden() != hidden) {
|
||||
peer->setStoriesHidden(hidden);
|
||||
if (!justRemove) {
|
||||
peer->setStoriesHidden(hidden);
|
||||
}
|
||||
session().api().request(MTPstories_TogglePeerStoriesHidden(
|
||||
peer->input,
|
||||
MTP_bool(hidden)
|
||||
|
@ -1192,6 +1195,11 @@ void Stories::toggleHidden(
|
|||
}
|
||||
});
|
||||
|
||||
if (justRemove) {
|
||||
apply(peer, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto i = _all.find(peerId);
|
||||
if (i == end(_all)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue