Skip to content

Commit

Permalink
Fix sign messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabboxl committed May 26, 2024
1 parent 57d62ad commit f0a3ecb
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions ClassevivaPCTO/Dialogs/NoticeDialogContent.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,14 @@ private string JoinAlertMessage
return "JoinRequestedMessage".GetLocalizedStr();
}

return "JoinRequestedMessage".GetLocalizedStr();
return string.Empty;
}
}

private string SignAlertMessage
{
get
{
if (CurrentNotice.needJoin)
{
if (CurrentReadResult.reply.replJoin.GetValueOrDefault())
return "JoinSuccessMessage".GetLocalizedStr();

return "JoinRequestedMessage".GetLocalizedStr();
}

if (CurrentNotice.needSign)
{
if (CurrentReadResult.reply.replSign == null)
Expand All @@ -67,7 +59,7 @@ private string SignAlertMessage
return "SignRefuseMessage".GetLocalizedStr();
}

return "JoinRequestedMessage".GetLocalizedStr();
return string.Empty;
}
}

Expand Down Expand Up @@ -100,9 +92,11 @@ private InfoBarSeverity SignAlertSeverityStatus

if (CurrentNotice.needSign)
{
if (CurrentReadResult.reply.replSign != null && (bool)CurrentReadResult.reply.replSign)
if (CurrentReadResult.reply.replSign == null)
return InfoBarSeverity.Informational;
if (CurrentReadResult.reply.replSign.GetValueOrDefault())
return InfoBarSeverity.Success;
if (CurrentReadResult.reply.replSign != null && !(bool)CurrentReadResult.reply.replSign)
if (!CurrentReadResult.reply.replSign.GetValueOrDefault())
return InfoBarSeverity.Error;
}

Expand Down

0 comments on commit f0a3ecb

Please sign in to comment.