Properly initialize appComponent

This commit is contained in:
2016-08-03 22:13:30 -04:00
parent 8132188e46
commit 11378e07bf

View File

@@ -81,10 +81,11 @@ public abstract class BaseDialog extends AppCompatDialogFragment
HabitsApplication app = HabitsApplication app =
(HabitsApplication) getContext().getApplicationContext(); (HabitsApplication) getContext().getApplicationContext();
prefs = app.getComponent().getPreferences(); appComponent = app.getComponent();
habitList = app.getComponent().getHabitList(); prefs = appComponent.getPreferences();
commandRunner = app.getComponent().getCommandRunner(); habitList = appComponent.getHabitList();
modelFactory = app.getComponent().getModelFactory(); commandRunner = appComponent.getCommandRunner();
modelFactory = appComponent.getModelFactory();
ButterKnife.bind(this, view); ButterKnife.bind(this, view);