mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Update
This commit is contained in:
parent
a1c3b7a588
commit
7606a5a0fe
1 changed files with 11 additions and 3 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#import "NSWeakReference.h"
|
||||
#import <UIKitRuntimeUtils/UIKitUtils.h>
|
||||
#import <dlfcn.h>
|
||||
|
||||
@interface UIViewControllerPresentingProxy : UIViewController
|
||||
|
||||
|
|
@ -457,8 +458,6 @@ static NSMutableDictionary<NSString *, TrustedWebRecord *> *trustedWebRecords()
|
|||
return value;
|
||||
}
|
||||
|
||||
void WKWebsiteDataStoreReinitializeAppBoundDomains(CFTypeRef dataStoreRef);
|
||||
|
||||
@implementation WebHelpers
|
||||
|
||||
+ (NSArray<NSString *> * _Nonnull)threadSafeTrustedDomains {
|
||||
|
|
@ -504,7 +503,16 @@ void WKWebsiteDataStoreReinitializeAppBoundDomains(CFTypeRef dataStoreRef);
|
|||
}
|
||||
|
||||
+ (void)forceRefreshTrustedDomains:(WKWebsiteDataStore * _Nonnull)websiteDataStore {
|
||||
WKWebsiteDataStoreReinitializeAppBoundDomains((__bridge CFTypeRef)(websiteDataStore));
|
||||
static void (*reinitializeFunction)(CFTypeRef dataStoreRef) = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSString *nameString = [NSString stringWithFormat:@"WK%@", @"WebsiteDataStoreReinitializeAppBoundDomains"];
|
||||
reinitializeFunction = dlsym(RTLD_DEFAULT, [nameString UTF8String]);
|
||||
});
|
||||
|
||||
if (reinitializeFunction) {
|
||||
reinitializeFunction((__bridge CFTypeRef)(websiteDataStore));
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue