mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
d476bc286d
* Auto-add new contact threads to profile whitelist when local user sends first message to that thread. * Ensure dynamic interactions have a non-negative timestamp even if the conversation was empty. * Only call updateMessageMappingRangeOptions _after_ beginLongLivedReadTransaction and updating messageMappings. * Improve documentation around how to avoid corrupt mappings in conversation view. * Fix edge cases around large initial range sizes. * Always treat dynamic interactions as read. * Rebuild the “unseen” database views to remove dynamic interactions (see above). // FREEBIE
42 lines
1.8 KiB
Objective-C
42 lines
1.8 KiB
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import <YapDatabase/YapDatabase.h>
|
|
|
|
@class ECKeyPair;
|
|
@class PreKeyRecord;
|
|
@class SignedPreKeyRecord;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface YapDatabaseConnection (OWS)
|
|
|
|
- (BOOL)hasObjectForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (BOOL)boolForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (int)intForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable id)objectForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable NSDate *)dateForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable NSDictionary *)dictionaryForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable NSString *)stringForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable NSData *)dataForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable ECKeyPair *)keyPairForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable PreKeyRecord *)preKeyRecordForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (nullable SignedPreKeyRecord *)signedPreKeyRecordForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
|
|
- (NSUInteger)numberOfKeysInCollection:(NSString *)collection;
|
|
|
|
#pragma mark -
|
|
|
|
- (void)setObject:(id)object forKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (void)setBool:(BOOL)value forKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (void)removeObjectForKey:(NSString *)string inCollection:(NSString *)collection;
|
|
- (void)setInt:(int)integer forKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (void)setDate:(NSDate *)value forKey:(NSString *)key inCollection:(NSString *)collection;
|
|
- (int)incrementIntForKey:(NSString *)key inCollection:(NSString *)collection;
|
|
|
|
- (void)purgeCollection:(NSString *)collection;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|