fix: clear history when logging out

This commit is contained in:
Anna 2020-08-08 06:21:57 -04:00
parent 6beca446fc
commit f5378f5c9d
2 changed files with 5 additions and 5 deletions

View File

@ -46,6 +46,7 @@ namespace PeepingTom {
this.logoutHook.Original(ptr);
this.plugin.Ui.Visible = false;
this.plugin.Watcher.ClearPrevious();
}
public void Dispose() {

View File

@ -46,11 +46,10 @@ namespace PeepingTom {
this.plugin = plugin ?? throw new ArgumentNullException(nameof(plugin), "PeepingTomPlugin cannot be null");
}
public Out WithCurrent<Out>(Func<IReadOnlyCollection<PlayerCharacter>, Out> func) {
this.currentMutex.WaitOne();
Out output = func(this.current);
this.currentMutex.ReleaseMutex();
return output;
public void ClearPrevious() {
this.previousMutex.WaitOne();
this.previousTargeters.Clear();
this.previousMutex.ReleaseMutex();
}
public void OnFrameworkUpdate(Framework framework) {