aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-01-23 01:14:28 +0100
committerdec05eba <dec05eba@protonmail.com>2022-01-23 01:14:28 +0100
commit4ac963533bd7e538febf001cc158fcbd46f0267a (patch)
treeb975148ff9a0a9729d8dd57cf7905dcfa411190d /src
parent0c71b0a9deb822c2acb89efdc21397fc195e82bf (diff)
4chan: do not reset comment navigation on next video, fix alpha color in rounded rectangle shader
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 069378e..594c1e1 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2485,7 +2485,9 @@ namespace QuickMedia {
if(event.type == mgl::Event::Resized) {
window_size.x = event.size.width;
window_size.y = event.size.height;
- } else if(event.type == mgl::Event::KeyPressed && event.key.code == mgl::Keyboard::Escape) {
+ } else if(event.type == mgl::Event::KeyPressed
+ && (event.key.code == mgl::Keyboard::Escape || event.key.code == mgl::Keyboard::Backspace))
+ {
task.cancel();
task_result = TaskResult::CANCEL;
goto task_end;
@@ -3149,11 +3151,10 @@ namespace QuickMedia {
// Find video that hasn't been played before in this video session
auto find_next_video = [this, parent_body, move_in_parent, &related_videos, &video_page, &new_video_url]() {
for(auto it = related_videos.begin(), end = related_videos.end(); it != end; ++it) {
- if(!(*it)->url.empty() && watched_videos.find((*it)->url) == watched_videos.end() && !video_page->video_should_be_skipped((*it)->url)) {
- if(parent_body && move_in_parent) {
- parent_body->filter_search_fuzzy("");
+ if((*it)->visible && !(*it)->url.empty() && watched_videos.find((*it)->url) == watched_videos.end() && !video_page->video_should_be_skipped((*it)->url)) {
+ if(parent_body && move_in_parent)
parent_body->set_selected_item(it->get());
- }
+
new_video_url = (*it)->url;
related_videos.erase(it);
break;
@@ -3986,14 +3987,8 @@ namespace QuickMedia {
current_page = PageType::VIDEO_CONTENT;
watched_videos.clear();
thread_page->set_url(selected_item->url);
- BodyItems next_items;
- int prev_selected = thread_body->get_selected_item();
// TODO: Use real title
video_content_page(thread_page, thread_page, "", true, thread_body, thread_body->get_selected_item());
- if(thread_body->get_selected_item() != prev_selected) {
- comment_navigation_stack.clear();
- comment_page_scroll_stack.clear();
- }
redraw = true;
idle_active_handler();
} else {