mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Add comments to RiotSettings.
This commit is contained in:
parent
146600facb
commit
e007a51b78
1 changed files with 9 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
import Foundation
|
||||
|
||||
/// Store Riot specific app settings.
|
||||
@objcMembers
|
||||
final class RiotSettings: NSObject {
|
||||
|
||||
|
@ -37,6 +38,7 @@ final class RiotSettings: NSObject {
|
|||
|
||||
// MARK: Notifications
|
||||
|
||||
/// Indicate if encrypted messages content should be displayed in notifications.
|
||||
var showDecryptedContentInNotifications: Bool {
|
||||
get {
|
||||
return UserDefaults.standard.bool(forKey: UserDefaultsKeys.notificationsShowDecryptedContent)
|
||||
|
@ -45,6 +47,7 @@ final class RiotSettings: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
/// Indicate if rooms with missed notifications should be displayed first on home screen.
|
||||
var pinRoomsWithMissedNotificationsOnHome: Bool {
|
||||
get {
|
||||
return UserDefaults.standard.bool(forKey: UserDefaultsKeys.pinRoomsWithMissedNotifications)
|
||||
|
@ -53,6 +56,7 @@ final class RiotSettings: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
/// Indicate if rooms with unread messages should be displayed first on home screen.
|
||||
var pinRoomsWithUnreadMessagesOnHome: Bool {
|
||||
get {
|
||||
return UserDefaults.standard.bool(forKey: UserDefaultsKeys.pinRoomsWithUnreadMessages)
|
||||
|
@ -73,6 +77,11 @@ final class RiotSettings: NSObject {
|
|||
|
||||
// MARK: Other
|
||||
|
||||
/// Indicate if `enableCrashReport` settings has been set once.
|
||||
var isEnableCrashReportHasBeenSetOnce: Bool {
|
||||
return UserDefaults.standard.object(forKey: UserDefaultsKeys.enableCrashReport) != nil
|
||||
}
|
||||
|
||||
var enableCrashReport: Bool {
|
||||
get {
|
||||
return UserDefaults.standard.bool(forKey: UserDefaultsKeys.enableCrashReport)
|
||||
|
|
Loading…
Reference in a new issue