feat(presenter): connect collection creation and viewing flows

This commit is contained in:
2026-08-27 00:23:02 +04:00
parent ea868cc687
commit abef518d74
2 changed files with 14 additions and 2 deletions
+1
View File
@@ -23,6 +23,7 @@ public final class App {
MultiWindowTextGUI gui = new MultiWindowTextGUI(screen);
AppState state = new AppState();
MainView view = new MainView();
MainPresenter presenter = new MainPresenter(state, view, gui);
@@ -2,16 +2,27 @@ package ru.project.presenter;
import com.googlecode.lanterna.gui2.WindowBasedTextGUI;
import ru.project.model.AppState;
import ru.project.view.CollectionView;
import ru.project.view.CreateCollectionView;
import ru.project.view.MainView;
public class MainPresenter extends BasePresenter {
private final MainView view;
private final CollectionPresenter collectionPresenter;
private final CreateCollectionPresenter createCollectionPresenter;
public MainPresenter(AppState state, MainView view, WindowBasedTextGUI gui) {
super(state, gui);
this.view = view;
this.collectionPresenter = new CollectionPresenter(state, new CollectionView(), gui);
this.createCollectionPresenter =
new CreateCollectionPresenter(state, new CreateCollectionView(), gui);
bindActions();
}
@@ -31,11 +42,11 @@ public class MainPresenter extends BasePresenter {
}
private void showCollection() {
// TODO
collectionPresenter.start();
}
private void createCollection() {
// TODO
createCollectionPresenter.start();
}
private void saveCollection() {