Disable admin logs next button when there are no more logs (#9277)
This commit is contained in:
@@ -125,11 +125,17 @@ public sealed class AdminLogsEui : BaseEui
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case NewLogs {Replace: true} newLogs:
|
||||
case NewLogs newLogs:
|
||||
if (newLogs.Replace)
|
||||
{
|
||||
LogsControl.SetLogs(newLogs.Logs);
|
||||
break;
|
||||
case NewLogs {Replace: false} newLogs:
|
||||
}
|
||||
else
|
||||
{
|
||||
LogsControl.AddLogs(newLogs.Logs);
|
||||
}
|
||||
|
||||
LogsControl.NextButton.Disabled = !newLogs.HasNext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public sealed class AdminLogsEui : BaseEui
|
||||
_filter.LastLogId = logs[largestId].Id;
|
||||
}
|
||||
|
||||
var message = new NewLogs(logs, replace);
|
||||
var message = new NewLogs(logs, replace, logs.Count >= _filter.Limit);
|
||||
|
||||
SendMessage(message);
|
||||
|
||||
|
||||
@@ -30,14 +30,16 @@ public static class AdminLogsEuiMsg
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class NewLogs : EuiMessageBase
|
||||
{
|
||||
public NewLogs(List<SharedAdminLog> logs, bool replace)
|
||||
public NewLogs(List<SharedAdminLog> logs, bool replace, bool hasNext)
|
||||
{
|
||||
Logs = logs;
|
||||
Replace = replace;
|
||||
HasNext = hasNext;
|
||||
}
|
||||
|
||||
public List<SharedAdminLog> Logs { get; set; }
|
||||
public bool Replace { get; set; }
|
||||
public bool HasNext { get; set; }
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
Reference in New Issue
Block a user