summaryrefslogtreecommitdiff
path: root/Pages/Gallery.razor
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-08-29 10:17:03 +1000
committerJake Mannens <jake@asger.xyz>2025-08-20 00:48:43 +1000
commit277642e460e2c1cb68952de86249f1525a9c1ab0 (patch)
treec1115d0bdfdcc782273649e8b6d2adcd8224df30 /Pages/Gallery.razor
parent2051c758477b68fea0f2d10b75d0d54430ab096a (diff)
Added cleanup when registering service event handlers
Diffstat (limited to 'Pages/Gallery.razor')
-rw-r--r--Pages/Gallery.razor4
1 files changed, 4 insertions, 0 deletions
diff --git a/Pages/Gallery.razor b/Pages/Gallery.razor
index e1ca180..6b8e330 100644
--- a/Pages/Gallery.razor
+++ b/Pages/Gallery.razor
@@ -4,6 +4,7 @@
@inject ITagService tagService
@inject ISearchService searchService
@inject IUserService userService
+@implements IDisposable
<PageTitle>@Title</PageTitle>
@@ -77,4 +78,7 @@
StateHasChanged();
});
}
+
+ public void Dispose() =>
+ userService.ShowNsfwChanged -= ShowNsfwChanged;
}