mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Remove changelog stories on archive attempt.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user