Skip to content

Commit

Permalink
remove deletes themes from state properly
Browse files Browse the repository at this point in the history
  • Loading branch information
beebls committed Feb 1, 2025
1 parent aabf5c5 commit 6c7b80a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/backend/state/theme-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ export const createCSSLoaderStore = (backend: Backend) =>
deleteTheme: async (themeId: string, refreshAfter: boolean = true) => {
set({ isWorking: true });
try {
const { themes, unpinnedThemes } = get();
const { themes, unpinnedThemes, updateStatuses } = get();
// The python defs say theme name, just gonna assume it's this and not ID
const themeName = themes.find((e) => e.id === themeId)?.name;
if (!themeName) return;
Expand All @@ -575,6 +575,8 @@ export const createCSSLoaderStore = (backend: Backend) =>
get().pinTheme(themeId);
}

set({ updateStatuses: updateStatuses.filter((e) => e[0] !== themeId) });

refreshAfter && (await get().getThemes());
} catch (error) {}
set({ isWorking: false });
Expand Down
2 changes: 1 addition & 1 deletion src/styles/styles-as-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,6 @@ MARK: Settings Page
}
.cl_squaredialogbutton_icontranslate {
transform: translateY(-2px) !important;
transform: translateY(2px) !important;
}
`;
2 changes: 1 addition & 1 deletion src/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -653,5 +653,5 @@ MARK: Settings Page
}

.cl_squaredialogbutton_icontranslate {
transform: translateY(-2px) !important;
transform: translateY(2px) !important;
}

0 comments on commit 6c7b80a

Please sign in to comment.