fix: clear history when logging out
This commit is contained in:
parent
6beca446fc
commit
f5378f5c9d
|
@ -46,6 +46,7 @@ namespace PeepingTom {
|
|||
this.logoutHook.Original(ptr);
|
||||
|
||||
this.plugin.Ui.Visible = false;
|
||||
this.plugin.Watcher.ClearPrevious();
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue