mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-31 09:52:04 +00:00
Make sure the flag that a memory warning was received is persisted right away
NSUserDefaults may not synchronize changes immediately, so if the kill happens before it persists changes, the information is lost.
This commit is contained in:
parent
cc480299eb
commit
4d414b78f4
@ -346,6 +346,7 @@ NSString *const kBITFakeCrashReport = @"BITFakeCrashAppString";
|
||||
// we only need to log this once
|
||||
if (!_didLogLowMemoryWarning) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kBITAppDidReceiveLowMemoryNotification];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
_didLogLowMemoryWarning = YES;
|
||||
}
|
||||
}];
|
||||
|
Loading…
x
Reference in New Issue
Block a user