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