[frontend] Suppress build warnings where appropriate

This commit is contained in:
Lilian 2024-07-10 19:59:09 +02:00
parent 443926d0f9
commit 6c588e0dfc
No known key found for this signature in database
4 changed files with 12 additions and 3 deletions

View file

@ -103,6 +103,7 @@
.Select(vis =>
new DropdownElement<NoteVisibility>
{
#pragma warning disable BL0005 // Setting this outside the component is fine until this is reworked
Icon = DropdownIcon(vis),
Content = DropdownContent(vis),
Selection = vis

View file

@ -20,6 +20,7 @@
[Parameter]
[EditorRequired]
#pragma warning disable BL0007 // While this implementation is suboptimal, this is technically fine. Should be reworked.
public required TBind Value
{
get => _value;

View file

@ -34,10 +34,9 @@
[Parameter] [EditorRequired] public required UserProfileResponse UserProfile { get; set; }
private ButtonType _buttonType;
protected override async Task OnInitializedAsync()
protected override void OnInitialized()
{
ChooseButton();
Console.WriteLine(UserProfile.Relations);
}
private enum ButtonType

View file

@ -23,7 +23,15 @@ internal class MessageService
public void Unregister(string id, EventHandler<NoteResponse> func)
{
NoteChangedHandlers[id] -= func;
if (NoteChangedHandlers.ContainsKey(id))
{
#pragma warning disable CS8601
NoteChangedHandlers[id] -= func;
}
else
{
throw new ArgumentException("Tried to unregister from callback that doesn't exist");
}
}
public Task UpdateNote(NoteResponse note)