mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-06 16:07:42 +02:00
Merge pull request #4243 from vector-im/element_4242
Show/Hide public directory in Unified Search
This commit is contained in:
@@ -7,6 +7,7 @@ Changes to be released in next version
|
||||
🙌 Improvements
|
||||
* MasterTabBarController: Show/Hide Home Screen tabs (#4234).
|
||||
* RoomVC: Enable / Disable VoIP feature in Rooms (#4236).
|
||||
* UnifiedSearchRecentsDataSource: Show/Hide public directory (#4242).
|
||||
|
||||
🐛 Bugfix
|
||||
*
|
||||
|
||||
@@ -291,4 +291,7 @@ final class BuildSettings: NSObject {
|
||||
static let authScreenShowPhoneNumber = true
|
||||
static let authScreenShowForgotPassword = true
|
||||
static let authScreenShowCustomServerOptions = true
|
||||
|
||||
// Mark: - Unified Search
|
||||
static let unifiedSearchScreenShowPublicDirectory = true
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ final class RiotSettings: NSObject {
|
||||
static let homeScreenShowCommunitiesTab = "homeScreenShowCommunitiesTab"
|
||||
static let roomScreenAllowVoIPForDirectRoom = "roomScreenAllowVoIPForDirectRoom"
|
||||
static let roomScreenAllowVoIPForNonDirectRoom = "roomScreenAllowVoIPForNonDirectRoom"
|
||||
static let unifiedSearchScreenShowPublicDirectory = "unifiedSearchScreenShowPublicDirectory"
|
||||
}
|
||||
|
||||
static let shared = RiotSettings()
|
||||
@@ -472,4 +473,18 @@ final class RiotSettings: NSObject {
|
||||
defaults.set(newValue, forKey: UserDefaultsKeys.settingsSecurityScreenShowAdvancedUnverifiedDevices)
|
||||
}
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user