aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-09 05:59:39 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-09 05:59:39 +0200
commit03a228f81f4a7a827a5a383bc16b8a2fb3abadb4 (patch)
tree19607b44ad01f933fe8d8d76d1bf6d68929de5e3 /src/QuickMedia.cpp
parent4b90946f677c2b073108637b5c0c8efaa8c47deb (diff)
Fix item selection not working with empty search
Fix history not working on mangatown. Make image scrolling faster in infinite scroll mode.
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp7
1 files changed, 5 insertions, 2 deletions
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;
}