diff --git a/Riot/Modules/SideMenu/SideMenuCoordinator.swift b/Riot/Modules/SideMenu/SideMenuCoordinator.swift index 96b25022a..fa8a6b9d5 100644 --- a/Riot/Modules/SideMenu/SideMenuCoordinator.swift +++ b/Riot/Modules/SideMenu/SideMenuCoordinator.swift @@ -284,12 +284,6 @@ extension SideMenuCoordinator: SpaceListCoordinatorDelegate { } func spaceListCoordinator(_ coordinator: SpaceListCoordinatorType, didPressMoreForSpaceWithId spaceId: String, from sourceView: UIView) { -// if UIDevice.current.isPhone { -// self.parameters.appNavigator.sideMenu.dismiss(animated: true) { -// self.showMenu(forSpaceWithId: spaceId, from: sourceView) -// } -// } else { - self.showMenu(forSpaceWithId: spaceId, from: sourceView) -// } + self.showMenu(forSpaceWithId: spaceId, from: sourceView) } } diff --git a/Riot/Modules/Spaces/SpaceList/SpaceListViewCell.swift b/Riot/Modules/Spaces/SpaceList/SpaceListViewCell.swift index 6e264520d..9366d2a8c 100644 --- a/Riot/Modules/Spaces/SpaceList/SpaceListViewCell.swift +++ b/Riot/Modules/Spaces/SpaceList/SpaceListViewCell.swift @@ -56,7 +56,7 @@ final class SpaceListViewCell: UITableViewCell, Themable, NibReusable { func fill(with viewData: SpaceListItemViewData) { self.avatarView.fill(with: viewData.avatarViewData) self.titleLabel.text = viewData.title - self.moreButton.isHidden = viewData.spaceId == "home" + self.moreButton.isHidden = viewData.spaceId == SpaceListViewModel.Constants.homeSpaceId } func update(theme: Theme) { diff --git a/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift b/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift index eef829377..8297caa3f 100644 --- a/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift +++ b/Riot/Modules/Spaces/SpaceList/SpaceListViewModel.swift @@ -20,6 +20,12 @@ import Foundation final class SpaceListViewModel: SpaceListViewModelType { + // MARK: - Constants + + enum Constants { + static let homeSpaceId: String = "home" + } + // MARK: - Properties // MARK: Private @@ -112,7 +118,7 @@ final class SpaceListViewModel: SpaceListViewModelType { private func createHomeViewData() -> SpaceListItemViewData { let avatarViewData = AvatarViewData(avatarUrl: nil, mediaManager: self.session.mediaManager, fallbackImage: .image(Asset.Images.spaceHomeIcon.image, .center)) - let homeViewData = SpaceListItemViewData(spaceId: "home", + let homeViewData = SpaceListItemViewData(spaceId: Constants.homeSpaceId, title: VectorL10n.spacesHomeSpaceTitle, avatarViewData: avatarViewData) return homeViewData } diff --git a/Riot/Modules/Spaces/SpaceMenu/SpaceMenuViewController.storyboard b/Riot/Modules/Spaces/SpaceMenu/SpaceMenuViewController.storyboard index 4ae759821..dfc8d09eb 100644 --- a/Riot/Modules/Spaces/SpaceMenu/SpaceMenuViewController.storyboard +++ b/Riot/Modules/Spaces/SpaceMenu/SpaceMenuViewController.storyboard @@ -26,7 +26,7 @@ - + - @@ -53,7 +52,7 @@ - + @@ -82,12 +81,13 @@ + - + + -