mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added behavior to hide spoilers when switching sections.
This commit is contained in:
@@ -1596,6 +1596,25 @@ void Session::unloadHeavyViewParts(
|
||||
}
|
||||
}
|
||||
|
||||
void Session::registerShownSpoiler(FullMsgId id) {
|
||||
if (const auto item = message(id)) {
|
||||
_shownSpoilers.emplace(item);
|
||||
}
|
||||
}
|
||||
|
||||
void Session::unregisterShownSpoiler(FullMsgId id) {
|
||||
if (const auto item = message(id)) {
|
||||
_shownSpoilers.remove(item);
|
||||
}
|
||||
}
|
||||
|
||||
void Session::hideShownSpoilers() {
|
||||
for (const auto &item : _shownSpoilers) {
|
||||
item->hideSpoilers();
|
||||
}
|
||||
_shownSpoilers = base::flat_set<not_null<HistoryItem*>>();
|
||||
}
|
||||
|
||||
void Session::removeMegagroupParticipant(
|
||||
not_null<ChannelData*> channel,
|
||||
not_null<UserData*> user) {
|
||||
|
Reference in New Issue
Block a user