stop clearing bug

This commit is contained in:
ntr committed 2023-08-04 16:04:10 +10:00
1 parent c61fd84f90
commit b8059a2511
1 file changed
+5 -1
+5 -1
View File
@@ -23,6 +23,8 @@ public class Timing: MonoBehaviour {
double sectorStart;
double lapStart;
IEnumerator noticeLifecycle;
void Awake() {
ui = GetComponent<TimingUI>();
sectorTimes = new List<SectorTime>();
@@ -114,7 +116,9 @@ public class Timing: MonoBehaviour {
Debug.Log($"EndLap {l}");
// have to show this before we persist the lap in case it is the pb
StartCoroutine(RecentLapLifecycle(l));
if (noticeLifecycle != null) StopCoroutine(noticeLifecycle);
noticeLifecycle = RecentLapLifecycle(l);
StartCoroutine(noticeLifecycle);
LapStorageService.PersistLap(l);
}