Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spaces] M10.5 Show suggested in room lists #4501 #4658

Merged
merged 12 commits into from
Aug 16, 2021

Conversation

gileluard
Copy link
Contributor

@gileluard gileluard commented Aug 4, 2021

Fixes #4501

Note that room preview may change.

@vector-im/design testable build here: https://i.diawi.com/WeA7ZY

Simulator Screen Shot - iPhone 12 Pro - 2021-08-12 at 14 57 03
Simulator Screen Shot - iPhone 12 Pro - 2021-08-12 at 14 57 13
Simulator Screen Shot - iPhone 12 Pro - 2021-08-12 at 14 58 05
Simulator Screen Shot - iPhone 12 Pro - 2021-08-12 at 14 58 21
Simulator Screen Shot - iPhone 12 Pro - 2021-08-12 at 14 58 28
Simulator Screen Shot - iPhone 12 Pro - 2021-08-12 at 14 58 48

- Request space suggested rooms in `RecentsDataSource`
…om_lists

# Conflicts:
#	Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m
- Show suggested rooms section in home screen (no actions)
- Show suggested rooms section in rooms screen (no actions)
…om_lists

# Conflicts:
#	Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m
@gileluard gileluard linked an issue Aug 4, 2021 that may be closed by this pull request
@gileluard gileluard changed the title [Spaces] M10.5 SDK: Support Spaces summary #4068 [Spaces] M10.5 Show suggested in room lists #4501 Aug 4, 2021

import Foundation

extension MXSpaceChildInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use RoomAvatarView or factorize this code for existing place where RoomAvatarView is not used. It seems copy paste several time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SBiOSoftWhare I don't understand your comment. setRoomAvatarImage is a method called twice alongside the method setRoomAvatarImage of the MXRoomSummary.

Copy link
Contributor

@SBiOSoftWhare SBiOSoftWhare Aug 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact if we can't use AvatarImageView subclass we can make an intermediate extension on MKImageView like this to avoid code duplication:

extension MXKImageView {
  func vc_setRoomAvatarImage(with url: String?, displayName: String, mediaManager: MXMediaManager) {
  }
}

@@ -1275,8 +1345,17 @@ + (RecentsDataSourceState *)computeStateWithCells:(NSArray<id<MXKRecentCellDataS
}
else if (recentsDataSourceMode == RecentsDataSourceModeRooms)
{
if (recentCellDataStoring.spaceChildInfo)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a small comment

@gileluard gileluard merged commit e111a23 into spaces Aug 16, 2021
@gileluard gileluard deleted the gil/4501_show_suggested_in_room_lists branch August 16, 2021 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Spaces] M10.5 SDK: Support Spaces summary
3 participants