mirror of
https://github.com/MinimalBible/MinimalBible-Legacy
synced 2024-11-13 19:48:38 -05:00
Dynamically create the ObjectGraph, rather than onCreate()
This commit is contained in:
parent
2e8974b745
commit
78997f704f
@ -49,8 +49,8 @@ public class MinimalBible extends Application {
|
||||
*/
|
||||
@Override
|
||||
public void onCreate() {
|
||||
graph = ObjectGraph.create(MinimalBibleModules.class);
|
||||
graph.inject(this);
|
||||
//TODO: Is this necessary?
|
||||
inject(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -58,6 +58,9 @@ public class MinimalBible extends Application {
|
||||
* @param o The object to be injected
|
||||
*/
|
||||
public void inject(Object o) {
|
||||
if (graph == null) {
|
||||
graph = ObjectGraph.create(MinimalBibleModules.class);
|
||||
}
|
||||
graph.inject(o);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user