2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use crl::time/now instead of TimeMs/getms.

This commit is contained in:
John Preston
2019-02-19 10:57:53 +04:00
parent d208236994
commit fe618bd652
310 changed files with 1133 additions and 1141 deletions

View File

@@ -580,13 +580,13 @@ void HistoryService::setServiceText(const PreparedText &prepared) {
void HistoryService::markMediaAsReadHook() {
if (const auto selfdestruct = Get<HistoryServiceSelfDestruct>()) {
if (!selfdestruct->destructAt) {
selfdestruct->destructAt = getms(true) + selfdestruct->timeToLive;
selfdestruct->destructAt = crl::now() + selfdestruct->timeToLive;
history()->owner().selfDestructIn(this, selfdestruct->timeToLive);
}
}
}
TimeMs HistoryService::getSelfDestructIn(TimeMs now) {
crl::time HistoryService::getSelfDestructIn(crl::time now) {
if (auto selfdestruct = Get<HistoryServiceSelfDestruct>()) {
if (selfdestruct->destructAt > 0) {
if (selfdestruct->destructAt <= now) {