From 6ccae839969c14d6cf96772f145a865486ee8d38 Mon Sep 17 00:00:00 2001 From: Boris Gjenero Date: Fri, 25 Oct 2024 00:28:34 -0400 Subject: [PATCH] Allow navigation to particular tab locations when loading page This disables a workaround which caused the initial loading to always end up at the playback page, even if another path was after the #. A comment claimed that it was a "workaround for lost history/back view after browser reload", so this might cause some problems. The workaround is still there, but commented out. --- www/app/services/router.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/www/app/services/router.js b/www/app/services/router.js index 738409c..24ce1ed 100644 --- a/www/app/services/router.js +++ b/www/app/services/router.js @@ -114,7 +114,17 @@ }; }); - /* @ngInject */ + /* @ ng Inject */ + /* This breaks direct navigation to links when the page loads, + * for example causing + * http://127.0.0.1:6680/mobile/index.html#/tracklist + * to go to + * http://127.0.0.1:6680/mobile/index.html#/ + * and then end up at + * http://127.0.0.1:6680/mobile/index.html#/playback + * because that is the angular-ui-router otherwise() location. + * I'm leaving this here, but disabled, because I don't know what + * else might break if I disable this. module.run(function($location, $log) { // workaround for lost history/back view after browser reload if ($location.url()) { @@ -123,5 +133,6 @@ $location.replace(); } }); + */ })(angular.module('app.services.router', ['ionic']));