From 9c2007e0cf99fe65b53fcc3c11a102297717a63c Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 1 Nov 2023 15:53:40 -0400 Subject: [PATCH] Rate limit saving times to make scrolling the edit box less laggy --- src/components/SponsorTimeEditComponent.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 22e10d42..191f8ce7 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -590,7 +590,24 @@ class SponsorTimeEditComponent extends React.Component { + this.saveEditTimes(); + }, timeSinceLastEdit) + } + + return; + } + + this.lastEditTime = Date.now(); + this.editTimeTimeout = null; + const sponsorTimesSubmitting = this.props.contentContainer().sponsorTimesSubmitting; const category = this.categoryOptionRef.current.value as Category