mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Made constructor for pushed snapshot.
This commit is contained in:
@@ -6,6 +6,7 @@ import uk.ac.ic.wlgitbridge.writelatex.api.request.getforversion.SnapshotFile;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.api.request.getsavedvers.SnapshotInfo;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.api.request.getsavedvers.WLUser;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -32,6 +33,15 @@ public class Snapshot implements Comparable<Snapshot> {
|
||||
atts = data.getAtts();
|
||||
}
|
||||
|
||||
public Snapshot(int versionID) {
|
||||
this.versionID = versionID;
|
||||
comment = "Pushed update";
|
||||
userName = "Anonymous";
|
||||
userEmail = "anonymous@writelatex.com";
|
||||
srcs = new LinkedList<SnapshotFile>();
|
||||
atts = new LinkedList<SnapshotAttachment>();
|
||||
}
|
||||
|
||||
public int getVersionID() {
|
||||
return versionID;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class WLProject {
|
||||
}
|
||||
|
||||
public void putLatestSnapshot(int versionID) {
|
||||
snapshots.put(versionID, null);
|
||||
snapshots.put(versionID, new Snapshot(versionID));
|
||||
snapshotFetcher.putLatestVersion(versionID);
|
||||
latestSnapshotID = versionID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user