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 6e36915f5e510ca3dc67a0a713322baec2ec159e. * Fix redirect after deleting item Redirects to the parent of an item instead of homepage after deleting the item
This commit is contained in:
@@ -2021,7 +2021,13 @@ export default function (view, params) {
|
||||
itemContextMenu.show(getContextMenuOptions(selectedItem, user, button))
|
||||
.then(function (result) {
|
||||
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) {
|
||||
reload(self, view, params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user