More sensible VRAM sorting thing
Some checks failed
.NET Build and Publish to Gitea / build (push) Has been cancelled
Some checks failed
.NET Build and Publish to Gitea / build (push) Has been cancelled
This commit is contained in:
@@ -235,11 +235,17 @@ public class Pair : DisposableMediatorSubscriberBase
|
||||
{
|
||||
string? noteOrName = GetNoteOrName();
|
||||
|
||||
if (noteOrName != null)
|
||||
if (_mareConfig.Current.SortSyncshellsByVRAM)
|
||||
{
|
||||
return($"0{LastAppliedApproximateVRAMBytes}");
|
||||
}
|
||||
else if (noteOrName != null) {
|
||||
return $"0{noteOrName}";
|
||||
else
|
||||
}
|
||||
else {
|
||||
return $"9{UserData.AliasOrUID}";
|
||||
}
|
||||
}
|
||||
|
||||
public string GetPlayerNameHash()
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@ public class DrawGroupPair : DrawPairBase
|
||||
private readonly GroupPairFullInfoDto _fullInfoDto;
|
||||
private readonly GroupFullInfoDto _group;
|
||||
private readonly CharaDataManager _charaDataManager;
|
||||
public long VramUsage { get; set; }
|
||||
public long VRAMUsage { get; set; }
|
||||
|
||||
public DrawGroupPair(string id, Pair entry, ApiController apiController,
|
||||
MareMediator mareMediator, GroupFullInfoDto group, GroupPairFullInfoDto fullInfoDto,
|
||||
@@ -87,7 +87,6 @@ public class DrawGroupPair : DrawPairBase
|
||||
presenceText += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
|
||||
if (_pair.LastAppliedApproximateVRAMBytes >= 0)
|
||||
{
|
||||
VramUsage = _pair.LastAppliedApproximateVRAMBytes;
|
||||
presenceText += Environment.NewLine + "Approx. VRAM Usage: " + UiSharedService.ByteToString(_pair.LastAppliedApproximateVRAMBytes, true);
|
||||
}
|
||||
if (_pair.LastAppliedDataTris >= 0)
|
||||
|
@@ -428,6 +428,7 @@ internal sealed class GroupPanel
|
||||
var onlineUsers = new List<DrawGroupPair>();
|
||||
var offlineUsers = new List<DrawGroupPair>();
|
||||
|
||||
|
||||
foreach (var pair in sortedPairs)
|
||||
{
|
||||
var drawPair = new DrawGroupPair(
|
||||
@@ -452,16 +453,9 @@ internal sealed class GroupPanel
|
||||
{
|
||||
ImGui.TextUnformatted("Visible");
|
||||
ImGui.Separator();
|
||||
if (_mareConfig.Current.SortSyncshellsByVRAM)
|
||||
{
|
||||
List<DrawGroupPair> sortedVisibleUsers = visibleUsers.OrderBy(o=>o.VramUsage).ToList();
|
||||
_uidDisplayHandler.RenderPairList(sortedVisibleUsers);
|
||||
}
|
||||
else
|
||||
{
|
||||
_uidDisplayHandler.RenderPairList(visibleUsers);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (onlineUsers.Count > 0)
|
||||
|
Reference in New Issue
Block a user