(settings: UserSettings)
| 46 | // and not something we can encounter for, except for doing always two extra requests to explicitly |
| 47 | // check for this case which is inefficient usage of requesting storage. |
| 48 | private static migrateAutomationSettings(settings: UserSettings): void { |
| 49 | if (typeof settings.automation === 'string') { |
| 50 | const automationMode = settings.automation; |
| 51 | const automationBehavior: UserSettings['automation']['behavior'] = (settings as any).automationBehaviour; |
| 52 | if (settings.automation === '') { |
| 53 | settings.automation = { |
| 54 | enabled: false, |
| 55 | mode: automationMode, |
| 56 | behavior: automationBehavior, |
| 57 | }; |
| 58 | } else { |
| 59 | settings.automation = { |
| 60 | enabled: true, |
| 61 | mode: automationMode, |
| 62 | behavior: automationBehavior, |
| 63 | }; |
| 64 | } |
| 65 | delete (settings as any).automationBehaviour; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | private static migrateSiteListsV2(deprecated: any): Partial<UserSettings> { |
| 70 | const settings: Partial<UserSettings> = {}; |
no outgoing calls
no test coverage detected