mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 13:53:40 +01:00
Merge pull request #226 from Aireil/feat_print_updated_plugins
Add chat text when updating plugins
This commit is contained in:
commit
dec6e9454f
3 changed files with 22 additions and 12 deletions
|
|
@ -224,19 +224,9 @@ namespace Dalamud.Game {
|
|||
} else {
|
||||
var updatedPlugins = t.Result.UpdatedPlugins;
|
||||
|
||||
if (updatedPlugins.Count != 0) {
|
||||
if (updatedPlugins != null && updatedPlugins.Any()) {
|
||||
if (this.dalamud.Configuration.AutoUpdatePlugins) {
|
||||
this.dalamud.Framework.Gui.Chat.Print(string.Format(Loc.Localize("DalamudPluginUpdateSuccessful", "Auto-update:")));
|
||||
foreach (var plugin in updatedPlugins) {
|
||||
if (plugin.WasUpdated) {
|
||||
this.dalamud.Framework.Gui.Chat.Print(string.Format(Loc.Localize("DalamudPluginUpdateSuccessful", " 》 {0} updated to v{1}."), plugin.Name, plugin.Version));
|
||||
} else {
|
||||
this.dalamud.Framework.Gui.Chat.PrintChat(new XivChatEntry {
|
||||
MessageBytes = Encoding.UTF8.GetBytes(string.Format(Loc.Localize("DalamudPluginUpdateFailed", " 》 {0} update to v{1} failed."), plugin.Name, plugin.Version)),
|
||||
Type = XivChatType.Urgent
|
||||
});
|
||||
}
|
||||
}
|
||||
this.dalamud.PluginRepository.PrintUpdatedPlugins(updatedPlugins, Loc.Localize("DalamudPluginAutoUpdate", "Auto-update:"));
|
||||
} else {
|
||||
this.dalamud.Framework.Gui.Chat.PrintChat(new XivChatEntry {
|
||||
MessageBytes = new SeString(new List<Payload>() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue