mirror of https://github.com/opa334/TrollStore.git
Reload icons on app (un)install
This commit is contained in:
parent
0d5b72b19d
commit
f98b2a2094
|
@ -37,8 +37,8 @@ extern NSString *LSInstallTypeKey;
|
|||
|
||||
@protocol LSApplicationWorkspaceObserverProtocol <NSObject>
|
||||
@optional
|
||||
-(void)applicationsDidInstall:(id)arg1;
|
||||
-(void)applicationsDidUninstall:(id)arg1;
|
||||
- (void)applicationsDidInstall:(NSArray <LSApplicationProxy *>*)apps;
|
||||
- (void)applicationsDidUninstall:(NSArray <LSApplicationProxy *>*)apps;
|
||||
@end
|
||||
|
||||
@interface LSEnumerator : NSEnumerator
|
||||
|
|
|
@ -497,13 +497,25 @@ UIImage* imageWithSize(UIImage* image, CGSize size)
|
|||
[TSPresentationDelegate presentViewController:appSelectAlert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)applicationsDidInstall:(id)arg1
|
||||
- (void)purgeCachedIconsForApps:(NSArray <LSApplicationProxy *>*)apps
|
||||
{
|
||||
for (LSApplicationProxy *appProxy in apps) {
|
||||
NSString *appId = appProxy.bundleIdentifier;
|
||||
if (_cachedIcons[appId]) {
|
||||
[_cachedIcons removeObjectForKey:appId];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationsDidInstall:(NSArray <LSApplicationProxy *>*)apps
|
||||
{
|
||||
[self purgeCachedIconsForApps:apps];
|
||||
[self reloadTable];
|
||||
}
|
||||
|
||||
- (void)applicationsDidUninstall:(id)arg1
|
||||
- (void)applicationsDidUninstall:(NSArray <LSApplicationProxy *>*)apps
|
||||
{
|
||||
[self purgeCachedIconsForApps:apps];
|
||||
[self reloadTable];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue