Include 'e' tag in active theme deletion events
Pass the event ID of the active profile theme to clearActiveTheme so the kind 5 deletion includes both an 'a' tag and an 'e' tag. Updated all call sites (ThemeSelector and EditProfileForm).
This commit is contained in:
@@ -500,7 +500,7 @@ function ShareThemeSection() {
|
||||
} else {
|
||||
try {
|
||||
setIsDeleting(true);
|
||||
await clearActiveTheme();
|
||||
await clearActiveTheme(activeThemeQuery.data?.event.id);
|
||||
activeThemeQuery.refetch();
|
||||
toast({ title: 'Theme removed', description: 'Your profile theme is no longer shared.' });
|
||||
} catch (error) {
|
||||
|
||||
@@ -121,7 +121,7 @@ export function ThemeSelector() {
|
||||
await setActiveTheme({ colors });
|
||||
toast({ title: 'Theme shared', description: 'Your theme is now visible on your profile.' });
|
||||
} else {
|
||||
await clearActiveTheme();
|
||||
await clearActiveTheme(activeProfileTheme.data?.event.id);
|
||||
toast({ title: 'Theme hidden', description: 'Your theme is no longer visible on your profile.' });
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user