From 6c85194c3b1baef0eaa011c4f1b8e48e11860f45 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 3 Aug 2021 15:06:57 +0200 Subject: Make body items private, add accessor functions This allows body to automatically update dirty state (and other states). Correctly format newlines in codeblocks in matrix. --- src/plugins/Mangadex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/Mangadex.cpp') diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index 477608e..98683c1 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -307,7 +307,9 @@ namespace QuickMedia { PluginResult MangadexSearchPage::submit(const std::string &title, const std::string &url, std::vector &result_tabs) { chapter_image_urls.clear(); auto body = create_body(); - get_chapters_for_manga(this, url, 0, body->items, chapter_image_urls); + BodyItems body_items; + get_chapters_for_manga(this, url, 0, body_items, chapter_image_urls); + body->set_items(std::move(body_items)); result_tabs.push_back(Tab{std::move(body), std::make_unique(program, this, title, url), create_search_bar("Search...", SEARCH_DELAY_FILTER)}); return PluginResult::OK; } -- cgit v1.2.3