mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:06:30 +00:00
throttle reimplemented
This commit is contained in:
@@ -187,7 +187,7 @@ public partial class App
|
||||
|
||||
services.ConfigureSection<InferenceClientConfig>(context.Configuration);
|
||||
services.ConfigureSection<GpsDeniedClientConfig>(context.Configuration);
|
||||
services.AddSingleton<IInferenceClient, InferenceClient>();
|
||||
services.AddSingleton<IInferenceClient>(_inferenceClient);
|
||||
services.AddSingleton<IGpsMatcherClient, GpsMatcherClient>();
|
||||
services.AddSingleton<IInferenceService, InferenceService>();
|
||||
services.AddSingleton<IGpsMatcherService, GpsMatcherService>();
|
||||
@@ -238,7 +238,7 @@ public partial class App
|
||||
{
|
||||
var args = (KeyEventArgs)e;
|
||||
var keyEvent = new KeyEvent(sender, args, _formState.ActiveWindow);
|
||||
_ = ThrottleExt.Throttle(() => _mediator.Publish(keyEvent), TimeSpan.FromMilliseconds(50));
|
||||
ThrottleExt.Throttle(() => _mediator.Publish(keyEvent), KeyPressTaskId, TimeSpan.FromMilliseconds(50));
|
||||
}
|
||||
|
||||
protected override async void OnExit(ExitEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user