( themeIdentifier: ThemeIdentifier, isAutoSwitch = false, )
| 136 | }); |
| 137 | |
| 138 | async function set( |
| 139 | themeIdentifier: ThemeIdentifier, |
| 140 | isAutoSwitch = false, |
| 141 | ): Promise<void> { |
| 142 | console.debug("Theme controller setting theme", themeIdentifier, { |
| 143 | isAutoSwitch, |
| 144 | }); |
| 145 | await apply(themeIdentifier, undefined, isAutoSwitch); |
| 146 | |
| 147 | if (!isAutoSwitch && Config.autoSwitchTheme) { |
| 148 | setConfig("autoSwitchTheme", false); |
| 149 | showNoticeNotification("Auto switch theme disabled"); |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | export async function clearPreview(applyTheme = true): Promise<void> { |
| 154 | previewState = null; |
no test coverage detected