diff --git a/Telegram/SourceFiles/storage/localstorage.cpp b/Telegram/SourceFiles/storage/localstorage.cpp index 56320f6d7..c6b79d33a 100644 --- a/Telegram/SourceFiles/storage/localstorage.cpp +++ b/Telegram/SourceFiles/storage/localstorage.cpp @@ -4559,8 +4559,13 @@ void writeSelf() { void readSelf(const QByteArray &serialized, int32 streamVersion) { QDataStream stream(serialized); + const auto user = Auth().user(); + const auto wasLoadedStatus = std::exchange( + user->loadedStatus, + PeerData::NotLoaded); const auto self = Serialize::readPeer(streamVersion, stream); - if (!self || !self->isSelf() || self != Auth().user()) { + if (!self || !self->isSelf() || self != user) { + user->loadedStatus = wasLoadedStatus; return; }