nbusy / nbusy-android

NBusy Android app.
http://nbusy.com
Apache License 2.0
1 stars 0 forks source link

Introduce global AppState container #114

Open soygul opened 8 years ago

soygul commented 8 years ago

Related to (or replaces?) #103

Needed since InstanceManager + XxxManagers all have distributed state which makes things harder to track. It gets especially complex when managers start managing each other's life-cycles in a synchronous manner... whereas it should be only them managing it.

soygul commented 8 years ago

Firs step: As the initial state in containing all app state in one place, InstanceManager can subscribe to EventBus and listen to all XxxManager lifecycle calls from other managers/components and create instance or make calls.

This way, no component would directly depend on each other and all logic would be in InstanceManager.