aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-03-22 11:53:10 +0100
committerdec05eba <dec05eba@protonmail.com>2021-03-22 11:53:10 +0100
commitd4a598833dde476ad92592c6adc2afc2ebc61af0 (patch)
treeb10c26333333a5399dad892b3e46a1ffcc899877 /src
parent9ba59929c23c71a5231670a50c3fcb1165111c90 (diff)
Close previous video when going deeper in navigation, for example ctrl+r->search->channel->video
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp4
1 files changed, 2 insertions, 2 deletions
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<Tab> &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();