simplify Timer lambda

This commit is contained in:
Kang Yu 2024-12-07 13:17:11 -08:00
parent 886182afc1
commit b03ddd4470

View file

@ -701,7 +701,7 @@ namespace PersistentWindows.Common
BatchCaptureApplicationsOnCurrentDisplays(); BatchCaptureApplicationsOnCurrentDisplays();
}); });
restoreTimer = new Timer(state => { TimerRestore(); }); restoreTimer = new Timer(TimerRestore);
restoreFinishedTimer = new Timer(state => restoreFinishedTimer = new Timer(state =>
{ {
@ -3329,7 +3329,7 @@ namespace PersistentWindows.Common
return moved; return moved;
} }
private void TimerRestore() private void TimerRestore(object state)
{ {
if (pauseAutoRestore && !restoringFromDB && !restoringSnapshot) if (pauseAutoRestore && !restoringFromDB && !restoringSnapshot)
return; return;