From c3a91992c8358ff97649018b40dc97f8328e5595 Mon Sep 17 00:00:00 2001 From: giomfo Date: Thu, 29 Mar 2018 16:30:42 +0200 Subject: [PATCH] Bug Fix - Global Messages search: some search results are missing The messages were displayed only for the rooms opened recently by the users. --- Riot/Model/RoomList/HomeMessagesSearchDataSource.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Riot/Model/RoomList/HomeMessagesSearchDataSource.m b/Riot/Model/RoomList/HomeMessagesSearchDataSource.m index b8dd97a71..0d2787c60 100644 --- a/Riot/Model/RoomList/HomeMessagesSearchDataSource.m +++ b/Riot/Model/RoomList/HomeMessagesSearchDataSource.m @@ -1,6 +1,7 @@ /* Copyright 2016 OpenMarket Ltd Copyright 2017 Vector Creations Ltd + Copyright 2018 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -46,8 +47,8 @@ MXKRoomDataSource *roomDataSource; if (roomId) { - roomDataSource = [roomDataSourceManager roomDataSourceForRoom:roomId create:NO]; - + // Check whether the user knows this room to create the room data source if it doesn't exist. + roomDataSource = [roomDataSourceManager roomDataSourceForRoom:roomId create:([self.mxSession roomWithRoomId:roomId])]; if (roomDataSource) { // Prepare text font used to highlight the search pattern.