Only show transfers while active
This commit is contained in:
@@ -458,13 +458,14 @@ public class CompactUi : WindowMediatorSubscriberBase
|
||||
private void DrawTransfers()
|
||||
{
|
||||
var currentUploads = _fileTransferManager.CurrentUploads.ToList();
|
||||
|
||||
if (currentUploads.Any())
|
||||
{
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
ImGui.TextUnformatted(FontAwesomeIcon.Upload.ToIconString());
|
||||
ImGui.PopFont();
|
||||
ImGui.SameLine(35 * ImGuiHelpers.GlobalScale);
|
||||
|
||||
if (currentUploads.Any())
|
||||
{
|
||||
var totalUploads = currentUploads.Count;
|
||||
|
||||
var doneUploads = currentUploads.Count(c => c.IsTransferred);
|
||||
@@ -477,19 +478,16 @@ public class CompactUi : WindowMediatorSubscriberBase
|
||||
ImGui.SameLine(WindowContentWidth - textSize.X);
|
||||
ImGui.TextUnformatted(uploadText);
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.TextUnformatted("No uploads in progress");
|
||||
}
|
||||
|
||||
var currentDownloads = _currentDownloads.SelectMany(d => d.Value.Values).ToList();
|
||||
|
||||
if (currentDownloads.Any())
|
||||
{
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
ImGui.TextUnformatted(FontAwesomeIcon.Download.ToIconString());
|
||||
ImGui.PopFont();
|
||||
ImGui.SameLine(35 * ImGuiHelpers.GlobalScale);
|
||||
|
||||
if (currentDownloads.Any())
|
||||
{
|
||||
var totalDownloads = currentDownloads.Sum(c => c.TotalFiles);
|
||||
var doneDownloads = currentDownloads.Sum(c => c.TransferredFiles);
|
||||
var totalDownloaded = currentDownloads.Sum(c => c.TransferredBytes);
|
||||
@@ -502,10 +500,6 @@ public class CompactUi : WindowMediatorSubscriberBase
|
||||
ImGui.SameLine(WindowContentWidth - textSize.X);
|
||||
ImGui.TextUnformatted(downloadText);
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.TextUnformatted("No downloads in progress");
|
||||
}
|
||||
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.PersonCircleQuestion, "Mare Character Data Analysis", WindowContentWidth))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using ImGuiNET;
|
||||
using MareSynchronos.API.Data.Extensions;
|
||||
@@ -116,6 +117,16 @@ public class PairGroupsUi
|
||||
{
|
||||
using (ImRaii.PushId($"group-{tag}-buttons")) DrawButtons(tag, allUsers.Cast<DrawUserPair>().Where(p => otherUidsTaggedWithTag!.Contains(p.UID)).ToList());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Avoid uncomfortably close group names
|
||||
if (!_tagHandler.IsTagOpen(tag))
|
||||
{
|
||||
var size = ImGui.CalcTextSize("").Y + ImGui.GetStyle().FramePadding.Y * 2f;
|
||||
ImGui.SameLine();
|
||||
ImGui.Dummy(new(size, size));
|
||||
}
|
||||
}
|
||||
|
||||
if (!_tagHandler.IsTagOpen(tag)) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user