From ce9445287cb73b7640c8221f7b73ba777f9d49e0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 26 Mar 2018 00:56:40 +0400 Subject: [PATCH] Extend huge local cache map crash annotations. --- Telegram/SourceFiles/storage/localstorage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/storage/localstorage.cpp b/Telegram/SourceFiles/storage/localstorage.cpp index 3065fe0e19..8b29953f95 100644 --- a/Telegram/SourceFiles/storage/localstorage.cpp +++ b/Telegram/SourceFiles/storage/localstorage.cpp @@ -2205,10 +2205,6 @@ void _writeMap(WriteMapWhen when) { EncryptedDescriptor mapData(mapSize); - if (mapSize > 30 * 1024 * 1024) { - CrashReports::ClearAnnotation("MapSize"); - } - if (!_draftsMap.isEmpty()) { mapData.stream << quint32(lskDraft) << quint32(_draftsMap.size()); for (DraftsMap::const_iterator i = _draftsMap.cbegin(), e = _draftsMap.cend(); i != e; ++i) { @@ -2276,6 +2272,10 @@ void _writeMap(WriteMapWhen when) { map.writeEncrypted(mapData); _mapChanged = false; + + if (mapSize > 30 * 1024 * 1024) { + CrashReports::ClearAnnotation("MapSize"); + } } } // namespace