{"action":"created","issue":{"url":"https://api.github.com/repos/square/mortar/issues/163","labels_url":"https://api.github.com/repos/square/mortar/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/square/mortar/issues/163/comments","events_url":"https://api.github.com/repos/square/mortar/issues/163/events","html_url":"https://github.com/square/mortar/issues/163","id":88155714,"number":163,"title":"migrating to Flow, mortar, dagger2 (and Anko) woes...","user":{"login":"Lakedaemon","id":103175,"avatar_url":"https://avatars.githubusercontent.com/u/103175?v=3","gravatar_id":"","url":"https://api.github.com/users/Lakedaemon","html_url":"https://github.com/Lakedaemon","followers_url":"https://api.github.com/users/Lakedaemon/followers","following_url":"https://api.github.com/users/Lakedaemon/following{/other_user}","gists_url":"https://api.github.com/users/Lakedaemon/gists{/gist_id}","starred_url":"https://api.github.com/users/Lakedaemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lakedaemon/subscriptions","organizations_url":"https://api.github.com/users/Lakedaemon/orgs","repos_url":"https://api.github.com/users/Lakedaemon/repos","events_url":"https://api.github.com/users/Lakedaemon/events{/privacy}","received_events_url":"https://api.github.com/users/Lakedaemon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-14T09:34:09Z","updated_at":"2015-06-22T14:27:20Z","closed_at":null,"body":"Though I worked around the LayoutInflater bug that swaps PathContext with AppCompatActivity by using Anko to instanciate my views with the right context, I still have problems migrating my app to Dagger2, Flow & Mortar : \r\n\r\n1) The way I save/restore state is my ViewPresenter must be wrong as state gets lost (and when I set flow to a new screen. It's really suspicious.), \r\n\r\nI know that takeView/dropView might be called out of order and read the recommandations in the source code \r\n\r\nI used print statements to figure out what was happening when I set a new View with flow but there is something suscpiscious happening :  I get a lot of dropView/takeView (some out of order) and view creations (like a total of 13 of those calls each time I set a view)\r\n\r\n2) I don't understand how to get \"flow Path\"-scoped MortarScopes\r\n\r\nI would like to use those, but havent figured out how to have them yet by looking at the doc on those sites : \r\n\r\nhttps://github.com/square/flow (for the flow + path concepts)\r\nhttps://github.com/square/mortar (there doesn't seem to be a sample for mortar+flow+dagger2, though it looks like there is one with mortar+flow+dagger1, with a ScreenScoper that uses Dagger1 ObjectGraph)\r\n\r\nhttps://github.com/pyricau/dagger2-mortar-flow-experiment/issues/2\r\nhttps://github.com/square/mortar/issues/129\r\n\r\nhttps://github.com/techery/presenta\r\n\r\nhttps://github.com/lukaspili/Auto-Mortar\r\nhttps://github.com/lukaspili/Auto-Dagger2\r\n\r\nI was hoping that Flow/Mortar would make things simpler for me but, at this point, this isn't the case.\r\nI'll post my progress here (to get some help/insight...and to help others that might have the same trouble than me)"},"comment":{"url":"https://api.github.com/repos/square/mortar/issues/comments/114127963","html_url":"https://github.com/square/mortar/issues/163#issuecomment-114127963","issue_url":"https://api.github.com/repos/square/mortar/issues/163","id":114127963,"user":{"login":"pforhan","id":331925,"avatar_url":"https://avatars.githubusercontent.com/u/331925?v=3","gravatar_id":"","url":"https://api.github.com/users/pforhan","html_url":"https://github.com/pforhan","followers_url":"https://api.github.com/users/pforhan/followers","following_url":"https://api.github.com/users/pforhan/following{/other_user}","gists_url":"https://api.github.com/users/pforhan/gists{/gist_id}","starred_url":"https://api.github.com/users/pforhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pforhan/subscriptions","organizations_url":"https://api.github.com/users/pforhan/orgs","repos_url":"https://api.github.com/users/pforhan/repos","events_url":"https://api.github.com/users/pforhan/events{/privacy}","received_events_url":"https://api.github.com/users/pforhan/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T14:27:20Z","updated_at":"2015-06-22T14:27:20Z","body":"Minor comment: override getSystemService in your Application object, not your Activity."}}