mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
feat: reload dev plugin manifest when enabling
This commit is contained in:
parent
056d398a58
commit
440f96fab2
2 changed files with 22 additions and 5 deletions
|
|
@ -288,11 +288,7 @@ internal class LocalPlugin : IDisposable
|
|||
if (reloading && this.IsDev)
|
||||
{
|
||||
// Reload the manifest in-case there were changes here too.
|
||||
var manifestDevFile = LocalPluginManifest.GetManifestFile(this.DllFile);
|
||||
if (manifestDevFile.Exists)
|
||||
{
|
||||
this.Manifest = LocalPluginManifest.Load(manifestDevFile);
|
||||
}
|
||||
this.ReloadManifest();
|
||||
}
|
||||
|
||||
switch (this.State)
|
||||
|
|
@ -627,6 +623,22 @@ internal class LocalPlugin : IDisposable
|
|||
this.SaveManifest();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reload the manifest if it exists, preserve the internal Disabled state.
|
||||
/// </summary>
|
||||
public void ReloadManifest()
|
||||
{
|
||||
var manifest = LocalPluginManifest.GetManifestFile(this.DllFile);
|
||||
if (manifest.Exists)
|
||||
{
|
||||
var isDisabled = this.IsDisabled; // saving the internal state because it could have been deleted
|
||||
this.Manifest = LocalPluginManifest.Load(manifest);
|
||||
this.Manifest.Disabled = isDisabled;
|
||||
|
||||
this.SaveManifest();
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetupLoaderConfig(LoaderConfig config)
|
||||
{
|
||||
config.IsUnloadable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue