From d4a598833dde476ad92592c6adc2afc2ebc61af0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 22 Mar 2021 11:53:10 +0100 Subject: Close previous video when going deeper in navigation, for example ctrl+r->search->channel->video --- src/QuickMedia.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 03f1e0d..f36d9fb 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1210,7 +1210,7 @@ namespace QuickMedia { //select_body_item_by_room(tabs[selected_tab].body.get(), current_chat_room); current_chat_room = nullptr; } else { - page_loop(new_tabs); + page_loop(new_tabs, 0, after_submit_handler); } for(Tab &tab : tabs) { @@ -1969,7 +1969,7 @@ namespace QuickMedia { bool page_changed = false; page_loop(tabs, 1, [this, &video_player, &page_changed](const std::vector &new_tabs) { - if(new_tabs.size() == 1 && new_tabs[0].page->get_type() == PageTypez::VIDEO) { + if(!page_changed && new_tabs.size() == 1 && new_tabs[0].page->get_type() == PageTypez::VIDEO) { window.setMouseCursorVisible(true); if(video_player) { video_player->quit_and_save_watch_later(); -- cgit v1.2.3