Skip to content

Commit

Permalink
fix(core): maxWait for sync progress debounce (toeverything#5377)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed Dec 22, 2023
1 parent a08edfd commit f11ea75
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,16 @@ const useSyncEngineSyncProgress = () => {
useEffect(() => {
setSyncEngineStatus(currentWorkspace.engine.sync.status);
const disposable = currentWorkspace.engine.sync.onStatusChange.on(
debounce(status => {
setSyncEngineStatus(status);
}, 500)
debounce(
status => {
setSyncEngineStatus(status);
},
300,
{
maxWait: 500,
trailing: true,
}
)
);
return () => {
disposable?.dispose();
Expand Down

0 comments on commit f11ea75

Please sign in to comment.