remove unncessary sha1 dictionary, use new notification management

This commit is contained in:
rootdarkarchon
2024-03-19 13:06:12 +01:00
committed by Loporrit
parent 94e104939e
commit 64f046f914
7 changed files with 14 additions and 13 deletions

View File

@@ -95,11 +95,11 @@ public partial class ApiController
switch (messageSeverity)
{
case MessageSeverity.Error:
Mediator.Publish(new NotificationMessage("Warning from " + _serverManager.CurrentServer!.ServerName, message, NotificationType.Error, 7500));
Mediator.Publish(new NotificationMessage("Warning from " + _serverManager.CurrentServer!.ServerName, message, NotificationType.Error, TimeSpan.FromSeconds(7.5)));
break;
case MessageSeverity.Warning:
Mediator.Publish(new NotificationMessage("Warning from " + _serverManager.CurrentServer!.ServerName, message, NotificationType.Warning, 7500));
Mediator.Publish(new NotificationMessage("Warning from " + _serverManager.CurrentServer!.ServerName, message, NotificationType.Warning, TimeSpan.FromSeconds(7.5)));
break;
case MessageSeverity.Information:
@@ -108,7 +108,7 @@ public partial class ApiController
_doNotNotifyOnNextInfo = false;
break;
}
Mediator.Publish(new NotificationMessage("Info from " + _serverManager.CurrentServer!.ServerName, message, NotificationType.Info, 5000));
Mediator.Publish(new NotificationMessage("Info from " + _serverManager.CurrentServer!.ServerName, message, NotificationType.Info, TimeSpan.FromSeconds(5)));
break;
}

View File

@@ -194,7 +194,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
$"Your client is outdated ({currentClientVer.Major}.{currentClientVer.Minor}.{currentClientVer.Build}), current is: " +
$"{_connectionDto.CurrentClientVersion.Major}.{_connectionDto.CurrentClientVersion.Minor}.{_connectionDto.CurrentClientVersion.Build}. " +
$"Please keep your Loporrit client up-to-date.",
NotificationType.Warning));
NotificationType.Warning, TimeSpan.FromSeconds(15)));
}
await LoadIninitialPairs().ConfigureAwait(false);

View File

@@ -28,7 +28,7 @@ public class ForeverRetryPolicy : IRetryPolicy
{
if (!_sentDisconnected)
{
_mediator.Publish(new NotificationMessage("Connection lost", "Connection lost to server", NotificationType.Warning, 5000));
_mediator.Publish(new NotificationMessage("Connection lost", "Connection lost to server", NotificationType.Warning, TimeSpan.FromSeconds(10)));
_mediator.Publish(new DisconnectedMessage());
}
_sentDisconnected = true;