Settings: Add show NSFW public rooms toggle.

This commit is contained in:
SBiOSoftWhare
2021-03-03 16:32:05 +01:00
parent d4b1c32140
commit 104f516a7f
4 changed files with 43 additions and 0 deletions
+10
View File
@@ -36,6 +36,7 @@ final class RiotSettings: NSObject {
static let hideVerifyThisSessionAlert = "hideVerifyThisSessionAlert"
static let hideReviewSessionsAlert = "hideReviewSessionsAlert"
static let matrixApps = "matrixApps"
static let showNSFWPublicRooms = "showNSFWPublicRooms"
}
static let shared = RiotSettings()
@@ -119,6 +120,15 @@ final class RiotSettings: NSObject {
}
}
/// Indicate to show Not Safe For Work public rooms.
var showNSFWPublicRooms: Bool {
get {
return defaults.bool(forKey: UserDefaultsKeys.showNSFWPublicRooms)
} set {
defaults.set(newValue, forKey: UserDefaultsKeys.showNSFWPublicRooms)
}
}
// MARK: User interface
var userInterfaceTheme: String? {