From 02b3ac4aaafc714108da966e6215ca366f3e2f7c Mon Sep 17 00:00:00 2001 From: Anish Sudini Date: Fri, 1 Nov 2024 15:18:50 -0400 Subject: [PATCH] Fix for Playlist Manager UI not appearing on Load UI was not appearing/injecting on load (if loaded page was a playlist). And also navigating to a non-playlist page and back to a playlist wouldn't inject the UI. but when you navigate to another page the UI would popup. Fixed all of these issues by adding a permanent history listener so that we are always detecting the current page at any point and then applying functionality/logic from there. --- src/extensions/playlistExtension.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/extensions/playlistExtension.tsx b/src/extensions/playlistExtension.tsx index f7ae6cf..fba74d5 100644 --- a/src/extensions/playlistExtension.tsx +++ b/src/extensions/playlistExtension.tsx @@ -380,4 +380,8 @@ const initPlaylistPageLogic = () => { }); }; -initPlaylistPageLogic(); \ No newline at end of file +initPlaylistPageLogic(); + +Spicetify.Platform.History.listen(() => { + initPlaylistPageLogic(); +}); \ No newline at end of file