aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-02-09 17:54:49 +0100
committerdec05eba <dec05eba@protonmail.com>2021-02-09 17:54:49 +0100
commit16c7256f555d41e8e86da3bcdf7990e75157b856 (patch)
treee0c748a4af582360dca27257f0b64214a4c8bf6c /src
parent8a76402e6edd16931a3456abd59df7c2ba735220 (diff)
The final solution to the room selection question
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp1
-rw-r--r--src/plugins/Matrix.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 0c3bb09..3bd75d6 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -1112,6 +1112,7 @@ namespace QuickMedia {
current_page = PageType::VIDEO_CONTENT;
video_content_page(static_cast<VideoPage*>(new_tabs[0].page.get()), selected_item->url, selected_item->get_title(), false);
} else if(new_tabs.size() == 1 && new_tabs[0].page->get_type() == PageTypez::CHAT) {
+ body_set_selected_item(tabs[selected_tab].body.get(), selected_item);
current_page = PageType::CHAT;
current_chat_room = matrix->get_room_by_id(selected_item->url);
while(window.isOpen()) {
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 4b980a0..8e1e54e 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -415,7 +415,7 @@ namespace QuickMedia {
});
}
- static void body_set_selected_item(Body *body, BodyItem *selected_item) {
+ void body_set_selected_item(Body *body, BodyItem *selected_item) {
for(size_t i = 0; i < body->items.size(); ++i) {
if(body->items[i]->url == selected_item->url) {
body->set_selected_item(i);