Fix unarchiving of the widget manager config. (#6541)

This commit is contained in:
Doug 2022-08-05 19:31:41 +01:00 committed by GitHub
parent 2b4f81fb82
commit 4ca11c19ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -779,6 +779,8 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
NSData *configsData = [userDefaults objectForKey:@"integrationManagerConfigs"];
if (configsData)
{
// We need to map the config class name since the bundle name was updated otherwise unarchiving crashes.
[NSKeyedUnarchiver setClass:WidgetManagerConfig.class forClassName:@"Riot.WidgetManagerConfig"];
configs = [NSMutableDictionary dictionaryWithDictionary:[NSKeyedUnarchiver unarchiveObjectWithData:configsData]];
}

1
changelog.d/6539.bugfix Normal file
View file

@ -0,0 +1 @@
Widgets: Fix a crash when loading the widget manager.