mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Made constructor for pushed snapshot.
This commit is contained in:
parent
7d650a8604
commit
c9d773b6e8
2 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue