File tree Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -34,22 +34,6 @@ export class DataLogging {
34
34
private onChange : ( state : Partial < State > ) => void
35
35
) { }
36
36
37
- delete ( ) {
38
- this . resetNonFlashStateExceptTimestamp ( ) ;
39
- this . size = 0 ;
40
- if ( this . logFull ) {
41
- this . logFull = false ;
42
- this . onChange ( {
43
- dataLogging : {
44
- type : "dataLogging" ,
45
- logFull : false ,
46
- } ,
47
- } ) ;
48
- }
49
-
50
- this . onLogDelete ( ) ;
51
- }
52
-
53
37
setMirroring ( mirroring : boolean ) {
54
38
this . mirroring = mirroring ;
55
39
}
@@ -151,9 +135,26 @@ export class DataLogging {
151
135
this . timestamp = MICROBIT_HAL_LOG_TIMESTAMP_NONE ;
152
136
}
153
137
138
+ delete ( ) {
139
+ this . resetNonFlashStateExceptTimestamp ( ) ;
140
+ this . headings = [ ] ;
141
+ this . size = 0 ;
142
+ if ( this . logFull ) {
143
+ this . logFull = false ;
144
+ this . onChange ( {
145
+ dataLogging : {
146
+ type : "dataLogging" ,
147
+ logFull : false ,
148
+ } ,
149
+ } ) ;
150
+ }
151
+
152
+ this . onLogDelete ( ) ;
153
+ }
154
+
154
155
private resetNonFlashStateExceptTimestamp ( ) {
156
+ // headings are considered flash state as MicroBitLog reparses them from flash
155
157
this . mirroring = false ;
156
- this . headings = [ ] ;
157
158
this . headingsChanged = false ;
158
159
this . timestampOnLastEndRow = undefined ;
159
160
this . row = undefined ;
You can’t perform that action at this time.
0 commit comments