changed session to a singleton method.
This commit is contained in:
@@ -40,7 +40,7 @@ public class Main extends Application {
|
||||
base = root;
|
||||
baseController = (BaseController) loader.getController();
|
||||
baseController.setParent(this);
|
||||
this.session = new Session();
|
||||
this.session = Session.session;
|
||||
try{
|
||||
DataManagerSerialiser dataManagerSerialiser = new DataManagerSerialiser();
|
||||
DataManager dataManager = dataManagerSerialiser.load();
|
||||
|
||||
@@ -7,8 +7,10 @@ public class Session {
|
||||
|
||||
private String userCode;//this is like fwy13
|
||||
DataManager dataManager;
|
||||
public static Session session = new Session();
|
||||
|
||||
public Session(){
|
||||
session = this;
|
||||
dataManager = new DataManager();
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user