@@ -1043,43 +1043,47 @@ function updatePlanningItemsWithRepeaters(
1043
1043
[ 'headers' , headerIndex , 'titleLine' , 'todoKeyword' ] ,
1044
1044
currentTodoSet . get ( 'keywords' ) . first ( )
1045
1045
) ;
1046
- const lastRepeatTimestamp = getCurrentTimestamp ( { isActive : false , withStartTime : true } ) ;
1047
- const newLastRepeatValue = [
1048
- {
1049
- type : 'timestamp' ,
1050
- id : generateId ( ) ,
1051
- firstTimestamp : lastRepeatTimestamp ,
1052
- secondTimestamp : null ,
1053
- } ,
1054
- ] ;
1055
- state = state . updateIn ( [ 'headers' , headerIndex , 'propertyListItems' ] , propertyListItems =>
1056
- propertyListItems . some ( item => item . get ( 'property' ) === 'LAST_REPEAT' )
1057
- ? propertyListItems . map ( item =>
1058
- item . get ( 'property' ) === 'LAST_REPEAT'
1059
- ? item . set ( 'value' , fromJS ( newLastRepeatValue ) )
1060
- : item
1061
- )
1062
- : propertyListItems . push (
1063
- fromJS ( {
1064
- property : 'LAST_REPEAT' ,
1065
- value : newLastRepeatValue ,
1066
- id : generateId ( ) ,
1067
- } )
1068
- )
1069
- ) ;
1070
- state = state . updateIn ( [ 'headers' , headerIndex ] , header => {
1071
- let rawDescription = header . get ( 'rawDescription' ) ;
1072
- if ( rawDescription . startsWith ( '\n' ) ) {
1073
- rawDescription = rawDescription . slice ( 1 ) ;
1074
- }
1075
- rawDescription =
1076
- `\n- State "${ newTodoState } " from "${ currentTodoState } " ${ renderAsText (
1077
- fromJS ( lastRepeatTimestamp )
1078
- ) } \n` + rawDescription ;
1079
- return header
1080
- . set ( 'rawDescription' , rawDescription )
1081
- . set ( 'description' , parseRawText ( rawDescription ) ) ;
1082
- } ) ;
1046
+
1047
+ if ( ! state . get ( 'fileConfigLines' ) . find ( elt => elt . match ( / ^ # \+ S T A R T U P : \s + n o l o g r e p e a t / ) ) ) {
1048
+ const lastRepeatTimestamp = getCurrentTimestamp ( { isActive : false , withStartTime : true } ) ;
1049
+ const newLastRepeatValue = [
1050
+ {
1051
+ type : 'timestamp' ,
1052
+ id : generateId ( ) ,
1053
+ firstTimestamp : lastRepeatTimestamp ,
1054
+ secondTimestamp : null ,
1055
+ } ,
1056
+ ] ;
1057
+
1058
+ state = state . updateIn ( [ 'headers' , headerIndex , 'propertyListItems' ] , propertyListItems =>
1059
+ propertyListItems . some ( item => item . get ( 'property' ) === 'LAST_REPEAT' )
1060
+ ? propertyListItems . map ( item =>
1061
+ item . get ( 'property' ) === 'LAST_REPEAT'
1062
+ ? item . set ( 'value' , fromJS ( newLastRepeatValue ) )
1063
+ : item
1064
+ )
1065
+ : propertyListItems . push (
1066
+ fromJS ( {
1067
+ property : 'LAST_REPEAT' ,
1068
+ value : newLastRepeatValue ,
1069
+ id : generateId ( ) ,
1070
+ } )
1071
+ )
1072
+ ) ;
1073
+ state = state . updateIn ( [ 'headers' , headerIndex ] , header => {
1074
+ let rawDescription = header . get ( 'rawDescription' ) ;
1075
+ if ( rawDescription . startsWith ( '\n' ) ) {
1076
+ rawDescription = rawDescription . slice ( 1 ) ;
1077
+ }
1078
+ rawDescription =
1079
+ `\n- State "${ newTodoState } " from "${ currentTodoState } " ${ renderAsText (
1080
+ fromJS ( lastRepeatTimestamp )
1081
+ ) } \n` + rawDescription ;
1082
+ return header
1083
+ . set ( 'rawDescription' , rawDescription )
1084
+ . set ( 'description' , parseRawText ( rawDescription ) ) ;
1085
+ } ) ;
1086
+ }
1083
1087
}
1084
1088
return state ;
1085
1089
}
0 commit comments