mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1007 B
Swift
29 lines
1007 B
Swift
7 years ago
|
//
|
||
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
@objc
|
||
|
public class SSKPreferences: NSObject {
|
||
|
// Never instantiate this class.
|
||
|
private override init() {}
|
||
|
|
||
|
private static let collection = "SSKPreferences"
|
||
|
private static let areLinkPreviewsEnabledKey = "areLinkPreviewsEnabled"
|
||
|
|
||
|
@objc
|
||
|
public class func areLinkPreviewsEnabled() -> Bool {
|
||
|
return OWSPrimaryStorage.dbReadConnection().bool(forKey: areLinkPreviewsEnabledKey,
|
||
|
inCollection: collection,
|
||
|
defaultValue: true)
|
||
|
}
|
||
|
|
||
|
@objc
|
||
|
public class func setAreLinkPreviewsEnabled(value: Bool) {
|
||
|
return OWSPrimaryStorage.dbReadWriteConnection().setBool(value,
|
||
|
forKey: areLinkPreviewsEnabledKey,
|
||
|
inCollection: collection)
|
||
|
}
|
||
|
}
|