(applyTheme = true)
| 151 | } |
| 152 | |
| 153 | export async function clearPreview(applyTheme = true): Promise<void> { |
| 154 | previewState = null; |
| 155 | |
| 156 | if (isPreviewingTheme) { |
| 157 | isPreviewingTheme = false; |
| 158 | if (applyTheme) { |
| 159 | if (randomTheme !== null) { |
| 160 | await apply(randomTheme); |
| 161 | } else if (Config.customTheme) { |
| 162 | await apply("custom"); |
| 163 | } else { |
| 164 | await apply(Config.theme); |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | let themesList: (ThemeName | string)[] = []; |
| 171 |
no test coverage detected