Attempt to have a minute grace whenever collection get removed.
This commit is contained in:
@@ -1463,7 +1463,10 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||
DrawPairPropertyRow("Has Handler", FormatBool(debugInfo.HasHandler));
|
||||
DrawPairPropertyRow("Handler Initialized", FormatBool(debugInfo.HandlerInitialized));
|
||||
DrawPairPropertyRow("Handler Visible", FormatBool(debugInfo.HandlerVisible));
|
||||
DrawPairPropertyRow("Last Time person rendered in", FormatTimestamp(debugInfo.InvisibleSinceUtc));
|
||||
DrawPairPropertyRow("Handler Timer Temp Collection removal", FormatCountdown(debugInfo.VisibilityEvictionRemainingSeconds));
|
||||
DrawPairPropertyRow("Handler Scheduled For Deletion", FormatBool(debugInfo.HandlerScheduledForDeletion));
|
||||
|
||||
DrawPairPropertyRow("Note", pair.GetNote() ?? "(none)");
|
||||
ImGui.EndTable();
|
||||
}
|
||||
@@ -1698,6 +1701,19 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||
return value is null ? "n/a" : value.Value.ToLocalTime().ToString("G", CultureInfo.CurrentCulture);
|
||||
}
|
||||
|
||||
private static string? FormatCountdown(double? remainingSeconds)
|
||||
{
|
||||
if (!remainingSeconds.HasValue)
|
||||
return "No";
|
||||
|
||||
var secs = Math.Max(0, remainingSeconds.Value);
|
||||
var t = TimeSpan.FromSeconds(secs);
|
||||
|
||||
return t.TotalHours >= 1
|
||||
? $"{(int)t.TotalHours:00}:{t.Minutes:00}:{t.Seconds:00}"
|
||||
: $"{(int)t.TotalMinutes:00}:{t.Seconds:00}";
|
||||
}
|
||||
|
||||
private static string FormatBytes(long value) => value < 0 ? "n/a" : UiSharedService.ByteToString(value);
|
||||
|
||||
private static string FormatCharacterId(uint id) => id == uint.MaxValue ? "n/a" : $"{id} (0x{id:X8})";
|
||||
|
||||
Reference in New Issue
Block a user