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)
|
switch (msg)
|
||||||
{
|
{
|
||||||
case NewLogs {Replace: true} newLogs:
|
case NewLogs newLogs:
|
||||||
LogsControl.SetLogs(newLogs.Logs);
|
if (newLogs.Replace)
|
||||||
break;
|
{
|
||||||
case NewLogs {Replace: false} newLogs:
|
LogsControl.SetLogs(newLogs.Logs);
|
||||||
LogsControl.AddLogs(newLogs.Logs);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogsControl.AddLogs(newLogs.Logs);
|
||||||
|
}
|
||||||
|
|
||||||
|
LogsControl.NextButton.Disabled = !newLogs.HasNext;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ public sealed class AdminLogsEui : BaseEui
|
|||||||
_filter.LastLogId = logs[largestId].Id;
|
_filter.LastLogId = logs[largestId].Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
var message = new NewLogs(logs, replace);
|
var message = new NewLogs(logs, replace, logs.Count >= _filter.Limit);
|
||||||
|
|
||||||
SendMessage(message);
|
SendMessage(message);
|
||||||
|
|
||||||
|
|||||||
@@ -30,14 +30,16 @@ public static class AdminLogsEuiMsg
|
|||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public sealed class NewLogs : EuiMessageBase
|
public sealed class NewLogs : EuiMessageBase
|
||||||
{
|
{
|
||||||
public NewLogs(List<SharedAdminLog> logs, bool replace)
|
public NewLogs(List<SharedAdminLog> logs, bool replace, bool hasNext)
|
||||||
{
|
{
|
||||||
Logs = logs;
|
Logs = logs;
|
||||||
Replace = replace;
|
Replace = replace;
|
||||||
|
HasNext = hasNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SharedAdminLog> Logs { get; set; }
|
public List<SharedAdminLog> Logs { get; set; }
|
||||||
public bool Replace { get; set; }
|
public bool Replace { get; set; }
|
||||||
|
public bool HasNext { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
|||||||
Reference in New Issue
Block a user