Merge pull request #4284 from vector-im/element_4252

[Spaces] Hide spaces from room list and home but keep space invites
This commit is contained in:
SBiOSoftWhare
2021-05-04 16:53:05 +02:00
committed by GitHub
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ Changes to be released in next version
*
🙌 Improvements
*
* Spaces: Hide spaces from room list and home but keep space invites (#4252).
🐛 Bugfix
* RoomVC: Avoid navigation to integration management using integration popup with settings set to integration disabled (#4261).
@@ -1188,7 +1188,11 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
}
else
{
[conversationCellDataArray addObject:recentCellDataStoring];
// Hide spaces from home (keep space invites)
if (room.summary.roomType != MXRoomTypeSpace)
{
[conversationCellDataArray addObject:recentCellDataStoring];
}
}
}
else if (_recentsDataSourceMode == RecentsDataSourceModeFavourites)
@@ -1219,12 +1223,12 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
// Consider only non direct rooms.
if (!room.isDirect)
{
// Keep only the invites, the favourites and the rooms without tag
// Keep only the invites, the favourites and the rooms without tag and room type different from space
if (room.summary.membership == MXMembershipInvite)
{
[invitesCellDataArray addObject:recentCellDataStoring];
}
else if (!room.accountData.tags.count || room.accountData.tags[kMXRoomTagFavourite])
else if ((!room.accountData.tags.count || room.accountData.tags[kMXRoomTagFavourite]) && room.summary.roomType != MXRoomTypeSpace)
{
[conversationCellDataArray addObject:recentCellDataStoring];
}