[frontend] Suppress build warnings where appropriate
This commit is contained in:
parent
443926d0f9
commit
6c588e0dfc
4 changed files with 12 additions and 3 deletions
|
@ -103,6 +103,7 @@
|
||||||
.Select(vis =>
|
.Select(vis =>
|
||||||
new DropdownElement<NoteVisibility>
|
new DropdownElement<NoteVisibility>
|
||||||
{
|
{
|
||||||
|
#pragma warning disable BL0005 // Setting this outside the component is fine until this is reworked
|
||||||
Icon = DropdownIcon(vis),
|
Icon = DropdownIcon(vis),
|
||||||
Content = DropdownContent(vis),
|
Content = DropdownContent(vis),
|
||||||
Selection = vis
|
Selection = vis
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
[EditorRequired]
|
[EditorRequired]
|
||||||
|
#pragma warning disable BL0007 // While this implementation is suboptimal, this is technically fine. Should be reworked.
|
||||||
public required TBind Value
|
public required TBind Value
|
||||||
{
|
{
|
||||||
get => _value;
|
get => _value;
|
||||||
|
|
|
@ -34,10 +34,9 @@
|
||||||
[Parameter] [EditorRequired] public required UserProfileResponse UserProfile { get; set; }
|
[Parameter] [EditorRequired] public required UserProfileResponse UserProfile { get; set; }
|
||||||
private ButtonType _buttonType;
|
private ButtonType _buttonType;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
ChooseButton();
|
ChooseButton();
|
||||||
Console.WriteLine(UserProfile.Relations);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum ButtonType
|
private enum ButtonType
|
||||||
|
|
|
@ -23,8 +23,16 @@ internal class MessageService
|
||||||
|
|
||||||
public void Unregister(string id, EventHandler<NoteResponse> func)
|
public void Unregister(string id, EventHandler<NoteResponse> func)
|
||||||
{
|
{
|
||||||
|
if (NoteChangedHandlers.ContainsKey(id))
|
||||||
|
{
|
||||||
|
#pragma warning disable CS8601
|
||||||
NoteChangedHandlers[id] -= func;
|
NoteChangedHandlers[id] -= func;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Tried to unregister from callback that doesn't exist");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Task UpdateNote(NoteResponse note)
|
public Task UpdateNote(NoteResponse note)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue