From 215ac920166087ffcf917c293caf6497adf50c3d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 8 Sep 2022 20:08:42 +0200 Subject: Add matrix known servers to config file instead of hardcoded, copy example config and readme to /usr/share/quickmedia --- src/QuickMedia.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/QuickMedia.cpp') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 2ac6f90..7cbe2c4 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1843,6 +1843,7 @@ namespace QuickMedia { } auto body = create_body(); + body->title_mark_urls = true; if(include_reverse_image_search && !body_item->url.empty() && !body_item->thumbnail_url.empty()) { std::string image_url = body_item->url; @@ -7536,21 +7537,12 @@ namespace QuickMedia { auto matrix_invites_page = std::make_unique(this, matrix, invites_body.get()); BodyItems room_dir_body_items; + add_body_item_unique_title(room_dir_body_items, matrix->get_homeserver_domain()); - add_body_item_unique_title(room_dir_body_items, "midov.pl"); - add_body_item_unique_title(room_dir_body_items, "matrix.org"); - add_body_item_unique_title(room_dir_body_items, "kde.org"); - add_body_item_unique_title(room_dir_body_items, "librem.one"); - add_body_item_unique_title(room_dir_body_items, "maunium.net"); - add_body_item_unique_title(room_dir_body_items, "halogen.city"); - add_body_item_unique_title(room_dir_body_items, "gnome.org"); - add_body_item_unique_title(room_dir_body_items, "shivering-isles.com"); - add_body_item_unique_title(room_dir_body_items, "nerdsin.space"); - add_body_item_unique_title(room_dir_body_items, "glowers.club"); - add_body_item_unique_title(room_dir_body_items, "privacytools.io"); - add_body_item_unique_title(room_dir_body_items, "linuxdelta.com"); - add_body_item_unique_title(room_dir_body_items, "tchncs.de"); - add_body_item_unique_title(room_dir_body_items, "jupiterbroadcasting.com"); + for(const std::string &known_homeserver : get_config().matrix.known_homeservers) { + add_body_item_unique_title(room_dir_body_items, known_homeserver); + } + auto room_directory_body = create_body(); room_directory_body->set_items(std::move(room_dir_body_items)); auto matrix_room_directory_page = std::make_unique(this, matrix); -- cgit v1.2.3