Skip to content

Commit

Permalink
set the visible default to true.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyhfish committed Feb 24, 2024
1 parent 4ac0483 commit fc0b326
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Oqtane.Client/Modules/Controls/ModuleMessage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public MessageType Type { get; set; }

[Parameter]
public bool Visible{ get; set; }
public bool Visible { get; set; } = true;

public void RefreshMessage(string message, MessageType type, bool visible)
{
Expand Down
11 changes: 9 additions & 2 deletions Oqtane.Client/UI/RenderModeBoundary.razor
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,15 @@
var messageTopVisible = !string.IsNullOrEmpty(_messageContent) && _messagePosition == "top";
var messageBottomVisible = !string.IsNullOrEmpty(_messageContent) && _messagePosition == "bottom";

moduleMessageTop.RefreshMessage(_messageContent, _messageType, messageTopVisible);
moduleMessageBottom.RefreshMessage(_messageContent, _messageType, messageBottomVisible);
if (moduleMessageTop != null)
{
moduleMessageTop.RefreshMessage(_messageContent, _messageType, messageTopVisible);
}

if (moduleMessageBottom != null)
{
moduleMessageBottom.RefreshMessage(_messageContent, _messageType, messageBottomVisible);
}
}

protected override async Task OnErrorAsync(Exception exception)
Expand Down

0 comments on commit fc0b326

Please sign in to comment.