Add read receipts preference.
// FREEBIE
This commit is contained in:
parent
80e5f281c6
commit
40d728e022
@ -52,13 +52,15 @@ extern NSString *const OWSPreferencesKeyEnableDebugLog;
|
||||
- (BOOL)hasRegisteredVOIPPush;
|
||||
- (void)setHasRegisteredVOIPPush:(BOOL)enabled;
|
||||
|
||||
|
||||
- (BOOL)hasDeclinedNoContactsView;
|
||||
- (void)setHasDeclinedNoContactsView:(BOOL)value;
|
||||
|
||||
- (void)setIOSUpgradeNagVersion:(NSString *)value;
|
||||
- (nullable NSString *)iOSUpgradeNagVersion;
|
||||
|
||||
- (BOOL)areReadReceiptsEnabled;
|
||||
- (void)setAreReadReceiptsEnabled:(BOOL)value;
|
||||
|
||||
#pragma mark - Calling
|
||||
|
||||
#pragma mark Callkit
|
||||
|
||||
@ -25,6 +25,7 @@ NSString *const OWSPreferencesKeyCallKitPrivacyEnabled = @"CallKitPrivacyEnabled
|
||||
NSString *const OWSPreferencesKeyCallsHideIPAddress = @"CallsHideIPAddress";
|
||||
NSString *const OWSPreferencesKeyHasDeclinedNoContactsView = @"hasDeclinedNoContactsView";
|
||||
NSString *const OWSPreferencesKeyIOSUpgradeNagVersion = @"iOSUpgradeNagVersion";
|
||||
NSString *const OWSPreferencesKeyAreReadReceiptsEnabled = @"areReadReceiptsEnabled";
|
||||
|
||||
@implementation OWSPreferences
|
||||
|
||||
@ -119,7 +120,6 @@ NSString *const OWSPreferencesKeyIOSUpgradeNagVersion = @"iOSUpgradeNagVersion";
|
||||
[self setValueForKey:OWSPreferencesKeyScreenSecurity toValue:@(flag)];
|
||||
}
|
||||
|
||||
|
||||
- (void)setHasRegisteredVOIPPush:(BOOL)enabled
|
||||
{
|
||||
[self setValueForKey:OWSPreferencesKeyHasRegisteredVoipPush toValue:@(enabled)];
|
||||
@ -155,7 +155,6 @@ NSString *const OWSPreferencesKeyIOSUpgradeNagVersion = @"iOSUpgradeNagVersion";
|
||||
[self setValueForKey:OWSPreferencesKeyHasArchivedAMessage toValue:@(enabled)];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)hasDeclinedNoContactsView
|
||||
{
|
||||
NSNumber *preference = [self tryGetValueForKey:OWSPreferencesKeyHasDeclinedNoContactsView];
|
||||
@ -178,6 +177,18 @@ NSString *const OWSPreferencesKeyIOSUpgradeNagVersion = @"iOSUpgradeNagVersion";
|
||||
return [self tryGetValueForKey:OWSPreferencesKeyIOSUpgradeNagVersion];
|
||||
}
|
||||
|
||||
- (BOOL)areReadReceiptsEnabled
|
||||
{
|
||||
NSNumber *preference = [self tryGetValueForKey:OWSPreferencesKeyAreReadReceiptsEnabled];
|
||||
// Default to NO.
|
||||
return preference ? [preference boolValue] : NO;
|
||||
}
|
||||
|
||||
- (void)setAreReadReceiptsEnabled:(BOOL)value
|
||||
{
|
||||
[self setValueForKey:OWSPreferencesKeyAreReadReceiptsEnabled toValue:@(value)];
|
||||
}
|
||||
|
||||
#pragma mark - Calling
|
||||
|
||||
#pragma mark CallKit
|
||||
|
||||
Loading…
Reference in New Issue
Block a user