fix: if external imported theme is current active theme change to default for installation
This commit is contained in:
1 file changed
+7
@@ -1068,6 +1068,13 @@
|
|||||||
themeInstalling = true;
|
themeInstalling = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if ($active_custom_theme && $active_custom_theme.name === droppedTheme.themeInfo.name) {
|
||||||
|
const defaultTheme = $custom_themes.find((t) => t.name === 'Default');
|
||||||
|
if (defaultTheme) {
|
||||||
|
loadTheme(defaultTheme, $custom_theme_container!, $custom_theme_volume);
|
||||||
|
await config.value<string>('theme').set(defaultTheme.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
await sileo.promise(
|
await sileo.promise(
|
||||||
importThemeFromFile(droppedTheme.themeInfo.name, droppedTheme.filePath),
|
importThemeFromFile(droppedTheme.themeInfo.name, droppedTheme.filePath),
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user