From eb89f7c3abc4956b3c0814e5125e02f05e9763e3 Mon Sep 17 00:00:00 2001 From: derrod Date: Sun, 3 Sep 2023 01:25:25 +0200 Subject: [PATCH] UI: Create/Delete YouTube Dock when switching profiles --- UI/window-basic-main-profiles.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/UI/window-basic-main-profiles.cpp b/UI/window-basic-main-profiles.cpp index cd4649ccc..f9d3f4ea1 100644 --- a/UI/window-basic-main-profiles.cpp +++ b/UI/window-basic-main-profiles.cpp @@ -317,6 +317,10 @@ bool OBSBasic::CreateProfile(const std::string &newName, bool create_new, if (create_new) { auth.reset(); DestroyPanelCookieManager(); +#ifdef YOUTUBE_ENABLED + if (youtubeAppDock) + DeleteYouTubeAppDock(); +#endif } else if (!rename) { DuplicateCurrentCookieProfile(config); } @@ -782,6 +786,10 @@ void OBSBasic::ChangeProfile() Auth::Save(); auth.reset(); DestroyPanelCookieManager(); +#ifdef YOUTUBE_ENABLED + if (youtubeAppDock) + DeleteYouTubeAppDock(); +#endif config.Swap(basicConfig); InitBasicConfigDefaults(); @@ -793,6 +801,10 @@ void OBSBasic::ChangeProfile() UpdateVolumeControlsDecayRate(); Auth::Load(); +#ifdef YOUTUBE_ENABLED + if (YouTubeAppDock::IsYTServiceSelected() && !youtubeAppDock) + NewYouTubeAppDock(); +#endif CheckForSimpleModeX264Fallback();