mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-10-26 16:45:18 +00:00
Merge pull request #8282 from sevenrats/fix/8280
Fix playbackstop listener leak on the movies page
This commit is contained in:
2 files changed
+7
-2
No files matched your search
@@ -347,7 +347,9 @@ export default function (view, params) {
|
||||
}));
|
||||
}
|
||||
|
||||
function onPlaybackStop(e, state) {
|
||||
function onPlaybackStop(e, stopInfo) {
|
||||
const state = stopInfo.state;
|
||||
|
||||
if (state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
||||
renderedTabs = [];
|
||||
mainTabsManager.getTabsElement().triggerTabChange();
|
||||
@@ -397,6 +399,7 @@ export default function (view, params) {
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
inputManager.off(window, onInputCommand);
|
||||
Events.off(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
});
|
||||
for (const tabController of tabControllers) {
|
||||
if (tabController.destroy) {
|
||||
|
||||
@@ -316,7 +316,9 @@ export default function (view, params) {
|
||||
});
|
||||
}
|
||||
|
||||
function onPlaybackStop(e, state) {
|
||||
function onPlaybackStop(e, stopInfo) {
|
||||
const state = stopInfo.state;
|
||||
|
||||
if (state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
||||
renderedTabs = [];
|
||||
mainTabsManager.getTabsElement().triggerTabChange();
|
||||
|
||||
Reference in new issue
Block a user