mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 11:02:48 +02:00
Make joining public rooms configurable
This commit is contained in:
@@ -52,6 +52,7 @@ final class RiotSettings: NSObject {
|
||||
static let roomCreationScreenAllowRoomTypeConfiguration = "roomCreationScreenAllowRoomTypeConfiguration"
|
||||
static let roomCreationScreenRoomIsPublic = "roomCreationScreenRoomIsPublic"
|
||||
static let allowInviteExernalUsers = "allowInviteExernalUsers"
|
||||
static let roomsAllowToJoinPublicRooms = "roomsAllowToJoinPublicRooms"
|
||||
}
|
||||
|
||||
static let shared = RiotSettings()
|
||||
@@ -242,6 +243,18 @@ 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 Creation Screen
|
||||
|
||||
var roomCreationScreenAllowEncryptionConfiguration: Bool {
|
||||
|
||||
Reference in New Issue
Block a user