mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix redirect after deleting item (#5930)
* Fix redirect after deleting item
Redirects to the parent of an item instead of homepage after deleting the item
* Revert "Fix redirect after deleting item"
This reverts commit 6e36915f5e
.
* Fix redirect after deleting item
Redirects to the parent of an item instead of homepage
after deleting the item
This commit is contained in:
parent
18ddf4956a
commit
5bd61d82a3
1 changed files with 7 additions and 1 deletions
|
@ -2021,7 +2021,13 @@ export default function (view, params) {
|
||||||
itemContextMenu.show(getContextMenuOptions(selectedItem, user, button))
|
itemContextMenu.show(getContextMenuOptions(selectedItem, user, button))
|
||||||
.then(function (result) {
|
.then(function (result) {
|
||||||
if (result.deleted) {
|
if (result.deleted) {
|
||||||
appRouter.goHome();
|
const parentId = selectedItem.SeasonId || selectedItem.SeriesId || selectedItem.ParentId;
|
||||||
|
|
||||||
|
if (parentId) {
|
||||||
|
appRouter.showItem(parentId, item.ServerId);
|
||||||
|
} else {
|
||||||
|
appRouter.goHome();
|
||||||
|
}
|
||||||
} else if (result.updated) {
|
} else if (result.updated) {
|
||||||
reload(self, view, params);
|
reload(self, view, params);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue