@@ -135,6 +135,14 @@ class FileContent {
135135 ) ;
136136 }
137137
138+ isOlderThan ( otherFileContent : FileContent | null ) : boolean {
139+ if ( ! otherFileContent ) return false ;
140+ const updatedAt = new Date ( this . updatedAt ) ;
141+ const otherUpdatedAt = new Date ( otherFileContent . updatedAt ) ;
142+
143+ return updatedAt < otherUpdatedAt ;
144+ }
145+
138146 clone ( { id } : { id : string } ) : FileContent {
139147 return new FileContent ( {
140148 title : this . title ,
@@ -353,6 +361,7 @@ export class FileSystemRepo {
353361 slide : localFileContent . slide ,
354362 name : basename ,
355363 modified : ! localFileContent . equals ( remoteFileContent ) ,
364+ isOlderThanRemote : localFileContent . isOlderThan ( remoteFileContent ) ,
356365 itemsShowPath : this . generateItemsShowPath ( localFileContent . id , basename ) ,
357366 published : remoteFileContent !== null ,
358367 itemPath,
@@ -388,6 +397,7 @@ export class FileSystemRepo {
388397 slide : localFileContent . slide ,
389398 name : basename ,
390399 modified : ! localFileContent . equals ( remoteFileContent ) ,
400+ isOlderThanRemote : localFileContent . isOlderThan ( remoteFileContent ) ,
391401 itemsShowPath : this . generateItemsShowPath ( localFileContent . id , basename ) ,
392402 published : remoteFileContent !== null ,
393403 itemPath,
0 commit comments