mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: notify when dev plugin reloads (closes #443)
This commit is contained in:
parent
5a9c1ecaa3
commit
25a71574cf
2 changed files with 15 additions and 2 deletions
|
|
@ -7,7 +7,6 @@ using Dalamud.Configuration.Internal;
|
|||
using Dalamud.Hooking;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Utility;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using Serilog;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Interface.Internal.Notifications;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal.Types;
|
||||
|
||||
|
|
@ -144,7 +145,20 @@ namespace Dalamud.Plugin.Internal
|
|||
return;
|
||||
}
|
||||
|
||||
this.Reload();
|
||||
try
|
||||
{
|
||||
this.Reload();
|
||||
Service<NotificationManager>.Get()
|
||||
.AddNotification(
|
||||
$"The DevPlugin '{this.Name} was reloaded successfully.", "Plugin reloaded!", NotificationType.Success);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "DevPlugin reload failed.");
|
||||
Service<NotificationManager>.Get()
|
||||
.AddNotification(
|
||||
$"The DevPlugin '{this.Name} could not be reloaded.", "Plugin reload failed!", NotificationType.Error);
|
||||
}
|
||||
},
|
||||
this.fileWatcherTokenSource.Token);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue