@@ -126,7 +126,10 @@ export async function createProject(node: NodeBase | undefined, api?: AtelierAPI
126
126
if ( desc !== undefined ) {
127
127
try {
128
128
// Create the project
129
- await api . actionQuery ( "INSERT INTO %Studio.Project (Name,Description) VALUES (?,?)" , [ name , desc ] ) ;
129
+ await api . actionQuery ( "INSERT INTO %Studio.Project (Name,Description,LastModified) VALUES (?,?,NOW())" , [
130
+ name ,
131
+ desc ,
132
+ ] ) ;
130
133
} catch ( error ) {
131
134
let message = `Failed to create project '${ name } '.` ;
132
135
if ( error && error . errorText && error . errorText !== "" ) {
@@ -910,6 +913,12 @@ export async function modifyProject(
910
913
[ ]
911
914
) ;
912
915
}
916
+ if ( add . length || remove . length ) {
917
+ // Update the project's timestamp
918
+ await api . actionQuery ( "UPDATE %Studio.Project SET LastModified = NOW() WHERE Name = ?" , [ project ] ) . catch ( ( ) => {
919
+ // Swallow error because VS Code doesn't care about the timestamp
920
+ } ) ;
921
+ }
913
922
} catch ( error ) {
914
923
let message = `Failed to modify project '${ project } '.` ;
915
924
if ( error && error . errorText && error . errorText !== "" ) {
@@ -1118,6 +1127,11 @@ export async function addIsfsFileToProject(
1118
1127
. join ( " UNION " ) } )`,
1119
1128
[ ]
1120
1129
) ;
1130
+
1131
+ // Update the project's timestamp
1132
+ await api . actionQuery ( "UPDATE %Studio.Project SET LastModified = NOW() WHERE Name = ?" , [ project ] ) . catch ( ( ) => {
1133
+ // Swallow error because VS Code doesn't care about the timestamp
1134
+ } ) ;
1121
1135
}
1122
1136
} catch ( error ) {
1123
1137
let message = `Failed to modify project '${ project } '.` ;
@@ -1223,7 +1237,10 @@ export async function modifyProjectMetadata(nodeOrUri: NodeBase | vscode.Uri | u
1223
1237
}
1224
1238
1225
1239
// Modify the project
1226
- await api . actionQuery ( "UPDATE %Studio.Project SET Description = ? WHERE Name = ?" , [ newDesc , project ] ) ;
1240
+ await api . actionQuery ( "UPDATE %Studio.Project SET Description = ?, LastModified = NOW() WHERE Name = ?" , [
1241
+ newDesc ,
1242
+ project ,
1243
+ ] ) ;
1227
1244
1228
1245
// Refesh the explorer
1229
1246
projectsExplorerProvider . refresh ( ) ;
0 commit comments