2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Add auto-delete control to compose controls.

This commit is contained in:
John Preston
2021-02-11 11:25:43 +04:00
parent 107d4aea36
commit f97064ed37
17 changed files with 293 additions and 87 deletions

View File

@@ -955,9 +955,16 @@ void PeerData::setMessagesTTL(
TimeId myPeriod,
TimeId peerPeriod,
bool oneSide) {
_ttlMyPeriod = myPeriod;
_ttlPeerPeriod = peerPeriod;
_ttlOneSide = oneSide;
if (_ttlMyPeriod != myPeriod
|| _ttlPeerPeriod != peerPeriod
|| _ttlOneSide != oneSide) {
_ttlMyPeriod = myPeriod;
_ttlPeerPeriod = peerPeriod;
_ttlOneSide = oneSide;
session().changes().peerUpdated(
this,
Data::PeerUpdate::Flag::MessagesTTL);
}
}
void PeerData::applyMessagesTTL(const MTPPeerHistoryTTL &ttl) {