From e1a8d10b61c5f8ca092ba3aa458b661da29ba447 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 30 Sep 2020 19:07:05 +0200 Subject: Matrix: add message replying with ctrl+r, also use shared_ptr for BodyItem --- src/plugins/Mangadex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/Mangadex.cpp') diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index fcbd23e..e9487bc 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -115,7 +115,7 @@ namespace QuickMedia { if(chapter_title_json.isString() && strlen(chapter_title_json.asCString()) > 0) chapter_name += std::string(" - ") + chapter_title_json.asCString(); - auto item = std::make_unique(std::move(chapter_name)); + auto item = BodyItem::create(std::move(chapter_name)); item->url = std::move(chapter_url); result_items.push_back(std::move(item)); } @@ -194,7 +194,7 @@ namespace QuickMedia { const char *href = quickmedia_html_node_get_attribute_value(node, "href"); const char *title = quickmedia_html_node_get_attribute_value(node, "title"); if(title && href && strncmp(href, "/title/", 7) == 0) { - auto item = std::make_unique(strip(title)); + auto item = BodyItem::create(strip(title)); item->url = mangadex_url + href; item_data->push_back(std::move(item)); } -- cgit v1.2.3