{"push_id":2922522646,"size":2,"distinct_size":2,"ref":"refs/heads/sessionManagerDefault","head":"4e78ae656fd19fa4414940008074698915c15dd0","before":"f483f8b1abffaf6d5d3edf63c19a0141020bf1f8","commits":[{"sha":"b1a63213f2bb4cea370bc4f0f04940f0604916e0","author":{"name":"Grisha Kruglov","email":"4c397c520b7dbdd3e04d58ae6dde52373bbb28e5@mozilla.com"},"message":"Add 'defaultSession' to SessionManager\n\nProblem this is trying to solve:\n\nSessionManager doesn't own its \"empty\" state (no selected session, no sessions at all).\nComponents which rely on the SessionManager may make assumptions about what happens\nwhen SessionManager becomes \"empty\", and current approach is for some component to \"take charge\",\nand be responsible for adding a \"default\" session when there are none left.\n\nThis doesn't bode well for composing components. We can get into a kind of \"action at a distance\"\nsituation, when various components make certain assumptions (say, SessionManager must always have\na selected session), but none of them actually take charge and populate the manager when appropriate.\nSince components aren't necessarily aware of each other, and ideally are arbitrarily composable,\nthis graph of implicit dependencies becomes problematic.\n\nThis patch:\nA naive solution to this is to get the SessionManager to owner its \"empty\" state.\nThis patch allows \"default\" behaviour to be specified at creation time, supplying a lambda\nwhich produces a default session. Not supplying this lambda is equivalent to allowing SessionManager\nto be empty.\n\nFixes #764.","distinct":true,"url":"https://api.github.com/repos/grigoryk/android-components/commits/b1a63213f2bb4cea370bc4f0f04940f0604916e0"},{"sha":"4e78ae656fd19fa4414940008074698915c15dd0","author":{"name":"Grisha Kruglov","email":"4c397c520b7dbdd3e04d58ae6dde52373bbb28e5@mozilla.com"},"message":"Post: remove 'onTabsTrayEmpty' callback from TabsFeature\n\nNow that SessionManager itself can handle its \"empty\" state, we don't\nneed a \"onEmpty\" callback for the tabs tray whose sole purpose is to populate\nSessionManager with a default session (as the sample browser was doing).\n\nWe can always re-add this if there's a more general need.","distinct":true,"url":"https://api.github.com/repos/grigoryk/android-components/commits/4e78ae656fd19fa4414940008074698915c15dd0"}]}
{"actor":{"display_login":"grigoryk"}}