aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-15 20:26:02 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-15 20:26:02 +0200
commitdccfb471ff7017f9ce3a6ed264a684e4fbc383e4 (patch)
treedf05404dcae6e26d2c1c8b2335d3d2899b913159 /src/plugins
parent2c0347ff7a13896dcc64c1deb4447449790bad73 (diff)
Add manga description to mangadex and mangakatana search, fix matrix notification invite not showing when opening quickmedia, clear fetch page and items on reload of lazy page
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Mangadex.cpp8
-rw-r--r--src/plugins/Matrix.cpp4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp
index 45e81cd..0178c1e 100644
--- a/src/plugins/Mangadex.cpp
+++ b/src/plugins/Mangadex.cpp
@@ -186,6 +186,14 @@ namespace QuickMedia {
auto body_item = BodyItem::create(std::move(title));
body_item->url = id_json.asString();
+ const Json::Value &description_json = attributes_json["description"];
+ if(description_json.isObject()) {
+ const Json::Value &en_json = description_json["en"];
+ if(en_json.isString()) {
+ body_item->set_description(en_json.asString());
+ body_item->set_description_color(sf::Color(179, 179, 179));
+ }
+ }
result_items.push_back(std::move(body_item));
}
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 89c9984..1e20bf6 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -1567,7 +1567,7 @@ namespace QuickMedia {
std::string room_id(room_id_json.GetString(), room_id_json.GetStringLength());
RoomData *room = get_room_by_id(room_id);
if(!room) {
- fprintf(stderr, "Warning: got notification in unknown room %s\n", room_id.c_str());
+ //fprintf(stderr, "Warning: got notification in unknown room %s\n", room_id.c_str());
continue;
}
@@ -2656,7 +2656,7 @@ namespace QuickMedia {
invite.room_avatar_url = room->get_avatar_url();
invite.invited_by = invited_by;
invite.timestamp = timestamp_json.GetInt64();
- invite.new_invite = !next_batch.empty();
+ invite.new_invite = !sync_is_cache;
std::string room_id_str(room_id.GetString(), room_id.GetStringLength());
if(set_invite(room_id_str, invite))