From 03a228f81f4a7a827a5a383bc16b8a2fb3abadb4 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 9 Jul 2020 05:59:39 +0200 Subject: Fix item selection not working with empty search Fix history not working on mangatown. Make image scrolling faster in infinite scroll mode. --- src/QuickMedia.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/QuickMedia.cpp') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 956ab32..cae1234 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -378,7 +378,6 @@ namespace QuickMedia { exit(1); } // TODO: Make asynchronous - // TODO: Make this also work for mangadex. Would require storing both id and name of the manga for_files_in_dir_sort_last_modified(content_storage_dir, [&history_body, this](const std::filesystem::path &filepath) { Path fullpath(filepath.c_str()); Json::Value body; @@ -396,6 +395,10 @@ namespace QuickMedia { body_item->url = "https://manganelo.com/manga/" + base64_decode(filename.string()); else if(current_plugin->name == "mangadex") body_item->url = "https://mangadex.org/title/" + base64_decode(filename.string()); + else if(current_plugin->name == "mangatown") + body_item->url = "https://mangatown.com/manga/" + base64_decode(filename.string()); + else + fprintf(stderr, "Error: Not implemented: filename to manga chapter list\n"); history_body.items.push_back(std::move(body_item)); } return true; @@ -423,7 +426,7 @@ namespace QuickMedia { search_bar->onTextSubmitCallback = [this, &tabs, &selected_tab, &typing](const std::string &text) -> bool { if(current_plugin->name != "dmenu") { - if(typing || text.empty()) + if(typing || tabs[selected_tab].body->no_items_visible()) return false; } -- cgit v1.2.3