Unverified Commit ce00ad8f authored by manuroe's avatar manuroe Committed by GitHub
Browse files

Merge pull request #4256 from vector-im/release/1.3.5/release

Release 1.3.5
parents 76975168 d671df41
name: CI
on:
# Triggers the workflow on any pull request and push to develop
push:
branches: [ develop ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
# Common cache
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Use right MatrixKit and MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_pending_releases
# Main step
- name: Build iOS simulator
run: bundle exec fastlane build
tests:
name: Tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
# Common cache
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Use right MatrixKit and MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_pending_releases
# Main step
- name: Unit tests
run: bundle exec fastlane test
Changes in 1.3.5 (2021-04-22)
=================================================
✨ Features
*
🙌 Improvements
* Add `gitter.im` to list of default room directories
* MasterTabBarController: Show/Hide Home Screen tabs (#4234).
* RoomVC: Enable / Disable VoIP feature in Rooms (#4236).
* UnifiedSearchRecentsDataSource: Show/Hide public directory (#4242).
* DirectoryRecentTableViewCell: Do not use "directory_search_results_more_than" string when there is no rooms and the search is on.
* RecentsVC: Make joining public rooms configurable (#4211).
* Make room settings screen configurable dynamically (#4219).
* RoomVC: Show / Hide integrations and actions (#4245).
🐛 Bugfix
* PublicRoomsDirectoryDataSource: Fix search when NSFW filter is off.
* RoomVC: Fix navigation issue when a room left.
* RoomVC: Fix a crash when scroll to bottom tapped on a left room.
⚠️ API Changes
*
🗣 Translations
*
🧱 Build
* GH Actions: Start using them for CI to check simulator build and tests.
Others
*
Improvements:
* Upgrade MatrixKit version ([v0.14.10](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.14.10)).
Changes in 1.3.4 (2021-04-19)
=================================================
......
......@@ -22,8 +22,8 @@ APPLICATION_GROUP_IDENTIFIER = group.im.vector
APPLICATION_SCHEME = element
// Version
MARKETING_VERSION = 1.3.4
CURRENT_PROJECT_VERSION = 1.3.4
MARKETING_VERSION = 1.3.5
CURRENT_PROJECT_VERSION = 1.3.5
// Team
......
......@@ -150,9 +150,12 @@ final class BuildSettings: NSObject {
static let publicRoomsAllowServerChange: Bool = true
// List of homeservers for the public rooms directory
static let publicRoomsDirectoryServers = [
"matrix.org"
"matrix.org",
"gitter.im"
]
// MARK: - Rooms Screen
static let roomsAllowToJoinPublicRooms: Bool = true
// MARK: - Analytics
static let analyticsServerUrl = URL(string: "https://piwik.riot.im/piwik.php")
......@@ -214,6 +217,13 @@ final class BuildSettings: NSObject {
/// Indicates should the app log out the user when number of biometrics failures reaches `maxAllowedNumberOfBiometricsFailures`. Defaults to `false`
static let logOutUserWhenBiometricsFailuresExceeded: Bool = false
// MARK: - Main Tabs
static let homeScreenShowFavouritesTab: Bool = true
static let homeScreenShowPeopleTab: Bool = true
static let homeScreenShowRoomsTab: Bool = true
static let homeScreenShowCommunitiesTab: Bool = true
// MARK: - General Settings Screen
static let settingsScreenShowUserFirstName: Bool = false
......@@ -249,6 +259,19 @@ final class BuildSettings: NSObject {
static let roomCreationScreenRoomIsEncrypted: Bool = true
static let roomCreationScreenAllowRoomTypeConfiguration: Bool = true
static let roomCreationScreenRoomIsPublic: Bool = false
// MARK: - Room Screen
static let roomScreenAllowVoIPForDirectRoom: Bool = true
static let roomScreenAllowVoIPForNonDirectRoom: Bool = true
static let roomScreenAllowCameraAction: Bool = true
static let roomScreenAllowMediaLibraryAction: Bool = true
static let roomScreenAllowStickerAction: Bool = true
static let roomScreenAllowFilesAction: Bool = true
// MARK: - Room Info Screen
static let roomInfoScreenShowIntegrations: Bool = true
// MARK: - Room Settings Screen
......@@ -259,7 +282,8 @@ final class BuildSettings: NSObject {
static let roomSettingsScreenShowAddressSettings: Bool = true
static let roomSettingsScreenShowFlairSettings: Bool = true
static let roomSettingsScreenShowAdvancedSettings: Bool = true
static let roomSettingsScreenAdvancedShowEncryptToVerifiedOption: Bool = true
// MARK: - Message
static let messageDetailsAllowShare: Bool = true
static let messageDetailsAllowPermalink: Bool = true
......@@ -279,4 +303,7 @@ final class BuildSettings: NSObject {
static let authScreenShowPhoneNumber = true
static let authScreenShowForgotPassword = true
static let authScreenShowCustomServerOptions = true
// Mark: - Unified Search
static let unifiedSearchScreenShowPublicDirectory = true
}
......@@ -11,7 +11,7 @@ use_frameworks!
# - `{ {kit spec hash} => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for each repo. Used by Fastfile during CI
#
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
$matrixKitVersion = '= 0.14.9'
$matrixKitVersion = '= 0.14.10'
# $matrixKitVersion = :local
# $matrixKitVersion = {'develop' => 'develop'}
......
......@@ -52,6 +52,27 @@ final class RiotSettings: NSObject {
static let roomCreationScreenAllowRoomTypeConfiguration = "roomCreationScreenAllowRoomTypeConfiguration"
static let roomCreationScreenRoomIsPublic = "roomCreationScreenRoomIsPublic"
static let allowInviteExernalUsers = "allowInviteExernalUsers"
static let roomSettingsScreenShowLowPriorityOption = "roomSettingsScreenShowLowPriorityOption"
static let roomSettingsScreenShowDirectChatOption = "roomSettingsScreenShowDirectChatOption"
static let roomSettingsScreenAllowChangingAccessSettings = "roomSettingsScreenAllowChangingAccessSettings"
static let roomSettingsScreenAllowChangingHistorySettings = "roomSettingsScreenAllowChangingHistorySettings"
static let roomSettingsScreenShowAddressSettings = "roomSettingsScreenShowAddressSettings"
static let roomSettingsScreenShowFlairSettings = "roomSettingsScreenShowFlairSettings"
static let roomSettingsScreenShowAdvancedSettings = "roomSettingsScreenShowAdvancedSettings"
static let roomSettingsScreenAdvancedShowEncryptToVerifiedOption = "roomSettingsScreenAdvancedShowEncryptToVerifiedOption"
static let roomsAllowToJoinPublicRooms = "roomsAllowToJoinPublicRooms"
static let homeScreenShowFavouritesTab = "homeScreenShowFavouritesTab"
static let homeScreenShowPeopleTab = "homeScreenShowPeopleTab"
static let homeScreenShowRoomsTab = "homeScreenShowRoomsTab"
static let homeScreenShowCommunitiesTab = "homeScreenShowCommunitiesTab"
static let roomScreenAllowVoIPForDirectRoom = "roomScreenAllowVoIPForDirectRoom"
static let roomScreenAllowVoIPForNonDirectRoom = "roomScreenAllowVoIPForNonDirectRoom"
static let roomScreenAllowCameraAction = "roomScreenAllowCameraAction"
static let roomScreenAllowMediaLibraryAction = "roomScreenAllowMediaLibraryAction"
static let roomScreenAllowStickerAction = "roomScreenAllowStickerAction"
static let roomScreenAllowFilesAction = "roomScreenAllowFilesAction"
static let roomInfoScreenShowIntegrations = "roomInfoScreenShowIntegrations"
static let unifiedSearchScreenShowPublicDirectory = "unifiedSearchScreenShowPublicDirectory"
}
static let shared = RiotSettings()
......@@ -77,7 +98,21 @@ final class RiotSettings: NSObject {
defaults.removeObject(forKey: UserDefaultsKeys.settingsSecurityScreenShowCryptographyInfo)
defaults.removeObject(forKey: UserDefaultsKeys.settingsSecurityScreenShowCryptographyExport)
defaults.removeObject(forKey: UserDefaultsKeys.settingsSecurityScreenShowAdvancedUnverifiedDevices)
defaults.removeObject(forKey: UserDefaultsKeys.roomCreationScreenAllowEncryptionConfiguration)
defaults.removeObject(forKey: UserDefaultsKeys.roomCreationScreenRoomIsEncrypted)
defaults.removeObject(forKey: UserDefaultsKeys.roomCreationScreenAllowRoomTypeConfiguration)
defaults.removeObject(forKey: UserDefaultsKeys.roomCreationScreenRoomIsPublic)
defaults.removeObject(forKey: UserDefaultsKeys.allowInviteExernalUsers)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenShowLowPriorityOption)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenShowDirectChatOption)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingAccessSettings)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingHistorySettings)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenShowAddressSettings)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenShowFlairSettings)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenShowAdvancedSettings)
defaults.removeObject(forKey: UserDefaultsKeys.roomSettingsScreenAdvancedShowEncryptToVerifiedOption)
defaults.removeObject(forKey: UserDefaultsKeys.allowInviteExernalUsers)
defaults.removeObject(forKey: UserDefaultsKeys.roomsAllowToJoinPublicRooms)
}
// MARK: Servers
......@@ -242,6 +277,95 @@ final class RiotSettings: NSObject {
}
}
// MARK: - Rooms Screen
var roomsAllowToJoinPublicRooms: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomsAllowToJoinPublicRooms) != nil else {
return BuildSettings.roomsAllowToJoinPublicRooms
}
return defaults.bool(forKey: UserDefaultsKeys.roomsAllowToJoinPublicRooms)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomsAllowToJoinPublicRooms)
}
}
// MARK: - Room Screen
var roomScreenAllowVoIPForDirectRoom: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomScreenAllowVoIPForDirectRoom) != nil else {
return BuildSettings.roomScreenAllowVoIPForDirectRoom
}
return defaults.bool(forKey: UserDefaultsKeys.roomScreenAllowVoIPForDirectRoom)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomScreenAllowVoIPForDirectRoom)
}
}
var roomScreenAllowVoIPForNonDirectRoom: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomScreenAllowVoIPForNonDirectRoom) != nil else {
return BuildSettings.roomScreenAllowVoIPForNonDirectRoom
}
return defaults.bool(forKey: UserDefaultsKeys.roomScreenAllowVoIPForNonDirectRoom)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomScreenAllowVoIPForNonDirectRoom)
}
}
var roomScreenAllowCameraAction: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomScreenAllowCameraAction) != nil else {
return BuildSettings.roomScreenAllowCameraAction
}
return defaults.bool(forKey: UserDefaultsKeys.roomScreenAllowCameraAction)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomScreenAllowCameraAction)
}
}
var roomScreenAllowMediaLibraryAction: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomScreenAllowMediaLibraryAction) != nil else {
return BuildSettings.roomScreenAllowMediaLibraryAction
}
return defaults.bool(forKey: UserDefaultsKeys.roomScreenAllowMediaLibraryAction)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomScreenAllowMediaLibraryAction)
}
}
var roomScreenAllowStickerAction: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomScreenAllowStickerAction) != nil else {
return BuildSettings.roomScreenAllowStickerAction
}
return defaults.bool(forKey: UserDefaultsKeys.roomScreenAllowStickerAction)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomScreenAllowStickerAction)
}
}
var roomScreenAllowFilesAction: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomScreenAllowFilesAction) != nil else {
return BuildSettings.roomScreenAllowFilesAction
}
return defaults.bool(forKey: UserDefaultsKeys.roomScreenAllowFilesAction)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomScreenAllowFilesAction)
}
}
// MARK: - Room Info Screen
var roomInfoScreenShowIntegrations: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomInfoScreenShowIntegrations) != nil else {
return BuildSettings.roomInfoScreenShowIntegrations
}
return defaults.bool(forKey: UserDefaultsKeys.roomInfoScreenShowIntegrations)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomInfoScreenShowIntegrations)
}
}
// MARK: - Room Creation Screen
var roomCreationScreenAllowEncryptionConfiguration: Bool {
......@@ -297,6 +421,49 @@ final class RiotSettings: NSObject {
defaults.set(newValue, forKey: UserDefaultsKeys.allowInviteExernalUsers)
}
}
// MARK: - Main Tabs
var homeScreenShowFavouritesTab: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.homeScreenShowFavouritesTab) != nil else {
return BuildSettings.homeScreenShowFavouritesTab
}
return defaults.bool(forKey: UserDefaultsKeys.homeScreenShowFavouritesTab)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.homeScreenShowFavouritesTab)
}
}
var homeScreenShowPeopleTab: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.homeScreenShowPeopleTab) != nil else {
return BuildSettings.homeScreenShowPeopleTab
}
return defaults.bool(forKey: UserDefaultsKeys.homeScreenShowPeopleTab)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.homeScreenShowPeopleTab)
}
}
var homeScreenShowRoomsTab: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.homeScreenShowRoomsTab) != nil else {
return BuildSettings.homeScreenShowRoomsTab
}
return defaults.bool(forKey: UserDefaultsKeys.homeScreenShowRoomsTab)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.homeScreenShowRoomsTab)
}
}
var homeScreenShowCommunitiesTab: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.homeScreenShowCommunitiesTab) != nil else {
return BuildSettings.homeScreenShowCommunitiesTab
}
return defaults.bool(forKey: UserDefaultsKeys.homeScreenShowCommunitiesTab)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.homeScreenShowCommunitiesTab)
}
}
// MARK: General Settings
......@@ -400,4 +567,101 @@ final class RiotSettings: NSObject {
defaults.set(newValue, forKey: UserDefaultsKeys.settingsSecurityScreenShowAdvancedUnverifiedDevices)
}
}
// MARK: - Room Settings Screen
var roomSettingsScreenShowLowPriorityOption: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenShowLowPriorityOption) != nil else {
return BuildSettings.roomSettingsScreenShowLowPriorityOption
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenShowLowPriorityOption)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenShowLowPriorityOption)
}
}
var roomSettingsScreenShowDirectChatOption: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenShowDirectChatOption) != nil else {
return BuildSettings.roomSettingsScreenShowDirectChatOption
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenShowDirectChatOption)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenShowDirectChatOption)
}
}
var roomSettingsScreenAllowChangingAccessSettings: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingAccessSettings) != nil else {
return BuildSettings.roomSettingsScreenAllowChangingAccessSettings
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingAccessSettings)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingAccessSettings)
}
}
var roomSettingsScreenAllowChangingHistorySettings: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingHistorySettings) != nil else {
return BuildSettings.roomSettingsScreenAllowChangingHistorySettings
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingHistorySettings)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenAllowChangingHistorySettings)
}
}
var roomSettingsScreenShowAddressSettings: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenShowAddressSettings) != nil else {
return BuildSettings.roomSettingsScreenShowAddressSettings
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenShowAddressSettings)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenShowAddressSettings)
}
}
var roomSettingsScreenShowFlairSettings: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenShowFlairSettings) != nil else {
return BuildSettings.roomSettingsScreenShowFlairSettings
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenShowFlairSettings)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenShowFlairSettings)
}
}
var roomSettingsScreenShowAdvancedSettings: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenShowAdvancedSettings) != nil else {
return BuildSettings.roomSettingsScreenShowAdvancedSettings
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenShowAdvancedSettings)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenShowAdvancedSettings)
}
}
var roomSettingsScreenAdvancedShowEncryptToVerifiedOption: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.roomSettingsScreenAdvancedShowEncryptToVerifiedOption) != nil else {
return BuildSettings.roomSettingsScreenAdvancedShowEncryptToVerifiedOption
}
return defaults.bool(forKey: UserDefaultsKeys.roomSettingsScreenAdvancedShowEncryptToVerifiedOption)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.roomSettingsScreenAdvancedShowEncryptToVerifiedOption)
}
}
// Mark: - Unified Search
var unifiedSearchScreenShowPublicDirectory: Bool {
get {
guard defaults.object(forKey: UserDefaultsKeys.unifiedSearchScreenShowPublicDirectory) != nil else {
return BuildSettings.unifiedSearchScreenShowPublicDirectory
}
return defaults.bool(forKey: UserDefaultsKeys.unifiedSearchScreenShowPublicDirectory)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.unifiedSearchScreenShowPublicDirectory)
}
}
}
......@@ -1808,9 +1808,16 @@
return;
}
self.roomsDirectoryCoordinatorBridgePresenter = [[RoomsDirectoryCoordinatorBridgePresenter alloc] initWithSession:self.mainSession dataSource:[self.recentsDataSource.publicRoomsDirectoryDataSource copy]];
self.roomsDirectoryCoordinatorBridgePresenter.delegate = self;
[self.roomsDirectoryCoordinatorBridgePresenter presentFrom:self animated:YES];
if (RiotSettings.shared.roomsAllowToJoinPublicRooms)
{
self.roomsDirectoryCoordinatorBridgePresenter = [[RoomsDirectoryCoordinatorBridgePresenter alloc] initWithSession:self.mainSession dataSource:[self.recentsDataSource.publicRoomsDirectoryDataSource copy]];
self.roomsDirectoryCoordinatorBridgePresenter.delegate = self;
[self.roomsDirectoryCoordinatorBridgePresenter presentFrom:self animated:YES];
}
else
{
[self createNewRoom];
}
}
- (void)openPublicRoom:(MXPublicRoom *)publicRoom
......
......@@ -22,6 +22,7 @@
#import "DirectoryRecentTableViewCell.h"
#import "MXRoom+Riot.h"
#import "Riot-Swift.h"
@interface UnifiedSearchRecentsDataSource()
{
......@@ -85,7 +86,10 @@
}
// The public rooms directory cell is then visible whatever the search activity.
self.directorySection = sectionsOffset++;
if (RiotSettings.shared.unifiedSearchScreenShowPublicDirectory)
{
self.directorySection = sectionsOffset++;
}
if (_hideRecents)
{
......
......@@ -54,7 +54,7 @@
self.titleLabel.text = NSLocalizedStringFromTable(@"directory_search_results_title", @"Vector", nil);
// Do we need to display like ">20 results found" or "18 results found"?
NSString *descriptionLabel = publicRoomsDirectoryDataSource.moreThanRoomsCount ? NSLocalizedStringFromTable(@"directory_search_results_more_than", @"Vector", nil) : NSLocalizedStringFromTable(@"directory_search_results", @"Vector", nil);
NSString *descriptionLabel = (publicRoomsDirectoryDataSource.moreThanRoomsCount && publicRoomsDirectoryDataSource.roomsCount > 0) ? NSLocalizedStringFromTable(@"directory_search_results_more_than", @"Vector", nil) : NSLocalizedStringFromTable(@"directory_search_results", @"Vector", nil);
self.descriptionLabel.text = [NSString stringWithFormat:descriptionLabel,
publicRoomsDirectoryDataSource.roomsCount,
......
......@@ -261,7 +261,7 @@ static NSString *const kNSFWKeyword = @"nsfw";
[self->rooms addObjectsFromArray:publicRooms];
self->nextBatch = publicRoomsResponse.nextBatch;
if (!self->_searchPattern || !self.showNSFWRooms)
if (!self->_searchPattern)
{
// When there is no search, we can use totalRoomCountEstimate returned by the server
self->_roomsCount = publicRoomsResponse.totalRoomCountEstimate;
......
......@@ -33,6 +33,12 @@ final class RoomInfoCoordinatorBridgePresenter: NSObject {
private let coordinatorParameters: RoomInfoCoordinatorParameters
private var coordinator: RoomInfoCoordinator?
private var navigationType: NavigationType = .present
private enum NavigationType {
case present
case push
}
// MARK: Public
......@@ -61,6 +67,7 @@ final class RoomInfoCoordinatorBridgePresenter: NSObject {
roomInfoCoordinator.start()
self.coordinator = roomInfoCoordinator
self.navigationType = .present
}
func push(from navigationController: UINavigationController, animated: Bool) {
......@@ -71,13 +78,27 @@ final class RoomInfoCoordinatorBridgePresenter: NSObject {
roomInfoCoordinator.start()
self.coordinator = roomInfoCoordinator
self.navigationType = .push
}
func dismiss(animated: Bool, completion: (() -> Void)?) {
guard let coordinator = self.coordinator else {
return
}
coordinator.toPresentable().dismiss(animated: