)]}'
{"src/app/storyboard/controller/header_controller.js":[{"author":{"_account_id":16960,"name":"Adam Coldrick","email":"adam.coldrick@codethink.co.uk","username":"SotK"},"change_message_id":"ba4f32e69281dbd54c27187839c08c9611e43991","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"5fc1f717_1c4b8a87","updated":"2019-03-21 09:24:20.000000000","message":"None of the changes in this file actually look to be needed to me.","commit_id":"e84d4624825b0fba61b819888985598831e1450c"}],"src/app/storyboard/module.js":[{"author":{"_account_id":16960,"name":"Adam Coldrick","email":"adam.coldrick@codethink.co.uk","username":"SotK"},"change_message_id":"ba4f32e69281dbd54c27187839c08c9611e43991","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            });"},{"line_number":66,"context_line":"    })"},{"line_number":67,"context_line":"    .run(function ($log, $rootScope, $document, $transitions,"},{"line_number":68,"context_line":"        localStorageService) {"},{"line_number":69,"context_line":"        \u0027use strict\u0027;"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        var resolvingClassName \u003d \u0027resolving\u0027;"}],"source_content_type":"text/javascript","patch_set":3,"id":"5fc1f717_f70c993c","line":68,"range":{"start_line":68,"start_character":8,"end_line":68,"end_character":27},"updated":"2019-03-21 09:24:20.000000000","message":"We should inject LastLocation rather than localStorageService, so that we don\u0027t need to duplicate the code from there.","commit_id":"e84d4624825b0fba61b819888985598831e1450c"},{"author":{"_account_id":16960,"name":"Adam Coldrick","email":"adam.coldrick@codethink.co.uk","username":"SotK"},"change_message_id":"ba4f32e69281dbd54c27187839c08c9611e43991","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        $transitions.onStart({}, function(transition){"},{"line_number":78,"context_line":"            body.addClass(resolvingClassName);"},{"line_number":79,"context_line":"            $rootScope.isResolving \u003d true;"},{"line_number":80,"context_line":"            if (transition.$to().name.indexOf(\u0027sb.auth\u0027) \u003d\u003d\u003d -1) {"},{"line_number":81,"context_line":"                var data \u003d {"},{"line_number":82,"context_line":"                    \u0027name\u0027: transition.$to().name,"},{"line_number":83,"context_line":"                    \u0027params\u0027: transition.params()"},{"line_number":84,"context_line":"                };"},{"line_number":85,"context_line":"                localStorageService.set(\u0027lastLocation\u0027,"},{"line_number":86,"context_line":"                    angular.toJson(data));"},{"line_number":87,"context_line":"            }"},{"line_number":88,"context_line":"        });"},{"line_number":89,"context_line":"        $transitions.onSuccess({}, function(){"},{"line_number":90,"context_line":"            body.removeClass(resolvingClassName);"}],"source_content_type":"text/javascript","patch_set":3,"id":"5fc1f717_f72579ac","line":87,"range":{"start_line":80,"start_character":0,"end_line":87,"end_character":13},"updated":"2019-03-21 09:24:20.000000000","message":"By injecting LastLocation, this can just be\n\n    LastLocation.onStateChange(transition);\n\nassuming LastLocation is modified to helpfully expose that function.","commit_id":"e84d4624825b0fba61b819888985598831e1450c"},{"author":{"_account_id":16960,"name":"Adam Coldrick","email":"adam.coldrick@codethink.co.uk","username":"SotK"},"change_message_id":"ba4f32e69281dbd54c27187839c08c9611e43991","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        });"},{"line_number":97,"context_line":"    })"},{"line_number":98,"context_line":"    .run(function ($log, $rootScope, $state, $transitions,"},{"line_number":99,"context_line":"        localStorageService) {"},{"line_number":100,"context_line":"        \u0027use strict\u0027;"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        // Listen to changes on the root scope. If it\u0027s an error in the state"}],"source_content_type":"text/javascript","patch_set":3,"id":"5fc1f717_3751c10f","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":27},"updated":"2019-03-21 09:24:20.000000000","message":"Similarly here we should use LastLocation to reduce code duplication.","commit_id":"e84d4624825b0fba61b819888985598831e1450c"},{"author":{"_account_id":16960,"name":"Adam Coldrick","email":"adam.coldrick@codethink.co.uk","username":"SotK"},"change_message_id":"ba4f32e69281dbd54c27187839c08c9611e43991","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        // Listen to changes on the root scope. If it\u0027s an error in the state"},{"line_number":103,"context_line":"        // changes (i.e. a 404) take the user back to the index."},{"line_number":104,"context_line":"        $transitions.onError({}, function(){"},{"line_number":105,"context_line":"            var last \u003d localStorageService.get(\u0027lastLocation\u0027);"},{"line_number":106,"context_line":"            if (!last) {"},{"line_number":107,"context_line":"                $state.go(\u0027sb.index\u0027, {});"},{"line_number":108,"context_line":"            } else {"},{"line_number":109,"context_line":"                last \u003d angular.fromJson(last);"},{"line_number":110,"context_line":"                $state.go(last.name, last.params);"},{"line_number":111,"context_line":"            }"},{"line_number":112,"context_line":"        });"},{"line_number":113,"context_line":"    })"},{"line_number":114,"context_line":"    .run(function ($http, DSCacheFactory) {"}],"source_content_type":"text/javascript","patch_set":3,"id":"5fc1f717_f77339b0","line":111,"range":{"start_line":105,"start_character":0,"end_line":111,"end_character":13},"updated":"2019-03-21 09:24:20.000000000","message":"Using LastLocation, this can be simplified to\n\n    LastLocation.go(\u0027sb.index\u0027, {});","commit_id":"e84d4624825b0fba61b819888985598831e1450c"}],"src/app/util/service/last_location.js":[{"author":{"_account_id":16960,"name":"Adam Coldrick","email":"adam.coldrick@codethink.co.uk","username":"SotK"},"change_message_id":"ba4f32e69281dbd54c27187839c08c9611e43991","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                    angular.toJson(data));"},{"line_number":41,"context_line":"            }"},{"line_number":42,"context_line":"        }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        // Add the listener to the application, remove it when the scope is"},{"line_number":45,"context_line":"        // destroyed."},{"line_number":46,"context_line":"        $transitions.onStart({}, onStateChange);"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        // The published API."},{"line_number":49,"context_line":"        return {"}],"source_content_type":"text/javascript","patch_set":3,"id":"5fc1f717_b765b1e3","line":46,"range":{"start_line":43,"start_character":0,"end_line":46,"end_character":48},"updated":"2019-03-21 09:24:20.000000000","message":"This isn\u0027t needed anymore now we start recording the location in module.js.","commit_id":"e84d4624825b0fba61b819888985598831e1450c"},{"author":{"_account_id":16960,"name":"Adam Coldrick","email":"adam.coldrick@codethink.co.uk","username":"SotK"},"change_message_id":"ba4f32e69281dbd54c27187839c08c9611e43991","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                    last \u003d angular.fromJson(last);"},{"line_number":63,"context_line":"                    $state.go(last.name, last.params);"},{"line_number":64,"context_line":"                }"},{"line_number":65,"context_line":"            }"},{"line_number":66,"context_line":"        };"},{"line_number":67,"context_line":"    });"}],"source_content_type":"text/javascript","patch_set":3,"id":"5fc1f717_77b42936","line":65,"updated":"2019-03-21 09:24:20.000000000","message":"To avoid the duplication mentioned earlier, you\u0027ll need to add something like\n\n    onStateChange: onStateChange\n\nto this object. Or, you could just move the whole function down here similar to the `go` function.","commit_id":"e84d4624825b0fba61b819888985598831e1450c"}]}
