|
24 | 24 | NSString *const AppExtensionFieldsKey = @"fields"; |
25 | 25 | NSString *const AppExtensionReturnedFieldsKey = @"returned_fields"; |
26 | 26 | NSString *const AppExtensionOldPasswordKey = @"old_password"; |
| 27 | +NSString *const AppExtensionPasswordGereratorOptionsKey = @"password_generator_options"; |
27 | 28 |
|
28 | 29 | // WebView Dictionary keys |
29 | 30 | NSString *const AppExtensionWebViewPageFillScript = @"fillScript"; |
@@ -137,8 +138,10 @@ - (void)storeLoginForURLString:(NSString *)URLString loginDetails:(NSDictionary |
137 | 138 | #ifdef __IPHONE_8_0 |
138 | 139 | NSMutableDictionary *newLoginAttributesDict = [NSMutableDictionary new]; |
139 | 140 | newLoginAttributesDict[AppExtensionURLStringKey] = URLString; |
140 | | - [newLoginAttributesDict addEntriesFromDictionary:loginDetailsDict]; // TODO: change 1P to use separate dicts |
141 | | - [newLoginAttributesDict addEntriesFromDictionary:passwordGenerationOptions]; |
| 141 | + [newLoginAttributesDict addEntriesFromDictionary:loginDetailsDict]; |
| 142 | + if (passwordGenerationOptions.count > 0) { |
| 143 | + newLoginAttributesDict[AppExtensionPasswordGereratorOptionsKey] = passwordGenerationOptions; |
| 144 | + } |
142 | 145 |
|
143 | 146 | __weak typeof (self) miniMe = self; |
144 | 147 |
|
@@ -188,7 +191,9 @@ - (void)changePasswordForLoginWithUsername:(NSString *)username andURLString:(NS |
188 | 191 | NSMutableDictionary *item = [NSMutableDictionary new]; |
189 | 192 | item[AppExtensionUsernameKey] = username; |
190 | 193 | item[AppExtensionURLStringKey] = URLString; |
191 | | - [item addEntriesFromDictionary:passwordGenerationOptions]; |
| 194 | + if (passwordGenerationOptions.count > 0) { |
| 195 | + item[AppExtensionPasswordGereratorOptionsKey] = passwordGenerationOptions; |
| 196 | + } |
192 | 197 |
|
193 | 198 | __weak typeof (self) miniMe = self; |
194 | 199 |
|
|
0 commit comments