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.logoutHook.Original(ptr);
|
||||||
|
|
||||||
this.plugin.Ui.Visible = false;
|
this.plugin.Ui.Visible = false;
|
||||||
|
this.plugin.Watcher.ClearPrevious();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
|
|
|
@ -46,11 +46,10 @@ namespace PeepingTom {
|
||||||
this.plugin = plugin ?? throw new ArgumentNullException(nameof(plugin), "PeepingTomPlugin cannot be null");
|
this.plugin = plugin ?? throw new ArgumentNullException(nameof(plugin), "PeepingTomPlugin cannot be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Out WithCurrent<Out>(Func<IReadOnlyCollection<PlayerCharacter>, Out> func) {
|
public void ClearPrevious() {
|
||||||
this.currentMutex.WaitOne();
|
this.previousMutex.WaitOne();
|
||||||
Out output = func(this.current);
|
this.previousTargeters.Clear();
|
||||||
this.currentMutex.ReleaseMutex();
|
this.previousMutex.ReleaseMutex();
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFrameworkUpdate(Framework framework) {
|
public void OnFrameworkUpdate(Framework framework) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user