Fix Next button resending the same admin logs (#16557)

This commit is contained in:
DrSmugleaf
2023-05-17 22:51:17 -07:00
committed by GitHub
parent b57717a6cc
commit 77ae2f2484
3 changed files with 2 additions and 6 deletions

View File

@@ -62,7 +62,6 @@ public sealed class AdminLogsEui : BaseEui
LogsControl.SelectedPlayers.ToArray(), LogsControl.SelectedPlayers.ToArray(),
null, null,
LogsControl.IncludeNonPlayerLogs, LogsControl.IncludeNonPlayerLogs,
null,
DateOrder.Descending); DateOrder.Descending);
SendMessage(request); SendMessage(request);

View File

@@ -165,8 +165,8 @@ public sealed class AdminLogsEui : BaseEui
var largestId = _filter.DateOrder switch var largestId = _filter.DateOrder switch
{ {
DateOrder.Ascending => ^1, DateOrder.Ascending => 0,
DateOrder.Descending => 0, DateOrder.Descending => ^1,
_ => throw new ArgumentOutOfRangeException(nameof(_filter.DateOrder), _filter.DateOrder, null) _ => throw new ArgumentOutOfRangeException(nameof(_filter.DateOrder), _filter.DateOrder, null)
}; };

View File

@@ -69,7 +69,6 @@ public static class AdminLogsEuiMsg
Guid[]? anyPlayers, Guid[]? anyPlayers,
Guid[]? allPlayers, Guid[]? allPlayers,
bool includeNonPlayers, bool includeNonPlayers,
int? lastLogId,
DateOrder dateOrder) DateOrder dateOrder)
{ {
RoundId = roundId; RoundId = roundId;
@@ -82,7 +81,6 @@ public static class AdminLogsEuiMsg
AnyPlayers = anyPlayers is { Length: > 0 } ? anyPlayers : null; AnyPlayers = anyPlayers is { Length: > 0 } ? anyPlayers : null;
AllPlayers = allPlayers is { Length: > 0 } ? allPlayers : null; AllPlayers = allPlayers is { Length: > 0 } ? allPlayers : null;
IncludeNonPlayers = includeNonPlayers; IncludeNonPlayers = includeNonPlayers;
LastLogId = lastLogId;
DateOrder = dateOrder; DateOrder = dateOrder;
} }
@@ -96,7 +94,6 @@ public static class AdminLogsEuiMsg
public Guid[]? AnyPlayers { get; set; } public Guid[]? AnyPlayers { get; set; }
public Guid[]? AllPlayers { get; set; } public Guid[]? AllPlayers { get; set; }
public bool IncludeNonPlayers { get; set; } public bool IncludeNonPlayers { get; set; }
public int? LastLogId { get; set; }
public DateOrder DateOrder { get; set; } public DateOrder DateOrder { get; set; }
} }