1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove unused methods in app router

This commit is contained in:
Bill Thornton 2022-04-21 13:47:12 -04:00
parent a59722126f
commit c961371835

View file

@ -103,19 +103,6 @@ class AppRouter {
return this.promiseShow;
}
// TODO: Unused?
async showDirect(path) {
if (this.promiseShow) await this.promiseShow;
this.promiseShow = new Promise((resolve) => {
this.resolveOnNextShow = resolve;
// Schedule a call to return the promise
setTimeout(() => history.push(this.baseUrl() + path), 0);
});
return this.promiseShow;
}
#goToRoute({ location, action }) {
// Strip the leading "!" if present
const normalizedPath = location.pathname.replace(/^!/, '');
@ -182,25 +169,6 @@ class AppRouter {
return window.history.length > 1;
}
// TODO: Unused?
invokeShortcut(id) {
if (id.indexOf('library-') === 0) {
id = id.replace('library-', '');
id = id.split('_');
this.showItem(id[0], id[1]);
} else if (id.indexOf('item-') === 0) {
id = id.replace('item-', '');
id = id.split('_');
this.showItem(id[0], id[1]);
} else {
id = id.split('_');
this.show(this.getRouteUrl(id[0], {
serverId: id[1]
}));
}
}
showItem(item, serverId, options) {
// TODO: Refactor this so it only gets items, not strings.
if (typeof (item) === 'string') {