From b360c74418394c62b4d55690342114a3d3afa5f0 Mon Sep 17 00:00:00 2001 From: Aireil <33433913+Aireil@users.noreply.github.com> Date: Mon, 14 Dec 2020 23:17:52 +0100 Subject: [PATCH] Fix and small change in plugin descriptions --- Dalamud/Plugin/PluginInstallerWindow.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Dalamud/Plugin/PluginInstallerWindow.cs b/Dalamud/Plugin/PluginInstallerWindow.cs index abcea773a..3688781cf 100644 --- a/Dalamud/Plugin/PluginInstallerWindow.cs +++ b/Dalamud/Plugin/PluginInstallerWindow.cs @@ -321,11 +321,17 @@ namespace Dalamud.Plugin ImGui.Indent(); ImGui.Text(pluginDefinition.Name); - ImGui.SameLine(); - ImGui.TextColored(new Vector4(0.5f, 0.5f, 0.5f, 1.0f), - $" by {pluginDefinition.Author}, {pluginDefinition.DownloadCount} downloads{(pluginDefinition.FromRepo != "goatcorp.github.io" ? $", from {pluginDefinition.FromRepo}" : string.Empty)}"); - ImGui.Text(pluginDefinition.Description); + ImGui.SameLine(); + + var info = $" by {pluginDefinition.Author}"; + info += pluginDefinition.DownloadCount != 0 ? $", {pluginDefinition.DownloadCount} downloads" : ", download count unavailable"; + if (pluginDefinition.FromRepo != "goatcorp.github.io" && !string.IsNullOrWhiteSpace(pluginDefinition.FromRepo)) + info += $", from {pluginDefinition.FromRepo}"; + ImGui.TextColored(new Vector4(0.5f, 0.5f, 0.5f, 1.0f), info); + + if (!string.IsNullOrWhiteSpace(pluginDefinition.Description)) + ImGui.Text(pluginDefinition.Description); if (!isInstalled) { if (this.installStatus == PluginInstallStatus.InProgress) {