diff --git a/controller/RootLayout.java b/controller/RootLayout.java index 2bf1c03..14aff6e 100644 --- a/controller/RootLayout.java +++ b/controller/RootLayout.java @@ -95,14 +95,6 @@ public class RootLayout extends Application implements EventObserver { /* (4) #scroll_container*/ new ContainerScrollStyleSheet( this.root_scene.lookup("#scroll_container") ); - - - NewsListModel.getInstance().addObserver("MainClass", this); - NewsListModel.getInstance().setCategory(Category.all); - NewsListModel.getInstance().setSortType(SortTypes.relevancy); - - TraductionModel.getInstance().addObserver("MainClass", this); - VBox subMenuContainer = (VBox) this.root_layout.lookup("#submenu"); for(Node n : subMenuContainer.getChildren()) { @@ -133,6 +125,12 @@ public class RootLayout extends Application implements EventObserver { this.handleMainLayoutChange("magazines"); + + NewsListModel.getInstance().addObserver("MainClass", this); + NewsListModel.getInstance().setCategory(Category.all); + NewsListModel.getInstance().setSortType(SortTypes.relevancy); + + TraductionModel.getInstance().addObserver("MainClass", this); }