fix(ux): reset input history on plugin dispose (F10.1)
Static InputHistoryService entries used to survive a plugin reload because static field state doesn't get cleaned up on its own. The new Reset() method clears the list and is wired into Plugin.DisposeAsync alongside the existing pure-memory cleanups, so the next plugin load starts with an empty history instead of inheriting the previous session's typed commands.
This commit is contained in:
@@ -372,6 +372,8 @@ public sealed class Plugin : IAsyncDalamudPlugin
|
||||
failure = CaptureFailure(failure, () => Functions?.Dispose());
|
||||
failure = CaptureFailure(failure, () => Commands?.Dispose());
|
||||
failure = CaptureFailure(failure, () => EmoteCache.Dispose());
|
||||
// Static input history would otherwise survive the plugin reload.
|
||||
failure = CaptureFailure(failure, InputHistoryService.Reset);
|
||||
|
||||
if (failure is not null)
|
||||
ExceptionDispatchInfo.Capture(failure).Throw();
|
||||
|
||||
Reference in New Issue
Block a user